View source: R/slope_and_angle.R
slope | R Documentation |
slope
returns the slope for given time and volume data.
slope(time, volume, degree = TRUE)
time |
A |
volume |
A |
degree |
Default |
Returns the slope and a fit
object.
time <- c(0, 3, 7, 11, 18, 22, 26, 30, 32, 35)
volume<- c(250.8, 320.4, 402.3, 382.6, 384, 445.9, 460.2, 546.8, 554.3, 617.9)
sl <- slope(time, volume)
par(pty="s")
xylimit <- range(c(time, volume))
plot(time, volume, type = "b", xlim = xylimit, ylim = xylimit)
abline(lm(volume~time))
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.