Description Usage Arguments Value Examples
View source: R/slope_and_angle.R
compute angle Computes the angle between two time-volume curves.
1 2 |
contr.time |
Time vector for control. |
contr.volume |
Volume vector for control. |
treat.time |
Time vector for treatment. |
treat.volume |
Volume vector for treatment. |
degree |
Default |
Returns batch response object.
1 2 3 4 5 6 7 8 9 10 11 | contr.time <- treat.time <- c(0, 3, 7, 11, 18, 22, 26, 30, 32, 35)
contr.volume<- contr.time * tan(60*pi/180)
treat.volume<- treat.time * tan(15*pi/180)
ang <- angle(contr.time, contr.volume, treat.time, treat.volume)
print(ang)
par(pty="s")
xylimit <- range(c(contr.time, contr.volume, treat.time, treat.volume))
plot(contr.time, contr.volume, type = "b", xlim = xylimit, ylim = xylimit)
lines(treat.time, treat.volume, type = "b")
abline(lm(contr.volume~contr.time))
abline(lm(treat.volume~treat.time))
|
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.