slope: Computes slope

Description Usage Arguments Value Examples

View source: R/slope_and_angle.R

Description

slope returns the slope for given time and volume data.

Usage

1
slope(time, volume, degree = TRUE)

Arguments

time

A vector of time.

volume

A vector of volume.

degree

Default TRUE will give angle in degrees and FALSE will return in radians.

Value

Returns the slope and a fit object.

Examples

1
2
3
4
5
6
7
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))

Xeva documentation built on Nov. 8, 2020, 5:56 p.m.