slope: Computes slope

View source: R/slope_and_angle.R

slopeR Documentation

Computes slope

Description

slope returns the slope for given time and volume data.

Usage

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

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))

bhklab/Xeva documentation built on Nov. 30, 2024, 3:17 a.m.