The R Project SVN R

Rev

Rev 72321 | Show entire file | Ignore whitespace | Details | Blame | Last modification | View Log | RSS feed

Rev 72321 Rev 80080
Line 80... Line 80...
80
## Form data plot and smooth line for the predictions
80
## Form data plot and smooth line for the predictions
81
opar <- par(las = 1)
81
opar <- par(las = 1)
82
plot(demand ~ Time, data = BOD, col = 4,
82
plot(demand ~ Time, data = BOD, col = 4,
83
     main = "BOD data and fitted first-order curve",
83
     main = "BOD data and fitted first-order curve",
84
     xlim = c(0,7), ylim = c(0, 20) )
84
     xlim = c(0,7), ylim = c(0, 20) )
85
tt <- seq(0, 8, length = 101)
85
tt <- seq(0, 8, length.out = 101)
86
lines(tt, predict(fm, list(Time = tt)))
86
lines(tt, predict(fm, list(Time = tt)))
87
par(opar)
87
par(opar)
88
\dontshow{options(od)}
88
\dontshow{options(od)}
89
}
89
}
90
\keyword{nonlinear}
90
\keyword{nonlinear}