Function to estimate the area under a curve given as x and y(x) values
Source:R/parametric_fits.R
low.integrate.Rd
Function to estimate the area under a curve given as x and y(x) values
Details
The function uses the the R internal function smooth.spline
.
Examples
# Create random growth dataset
rnd.dataset <- rdm.data(d = 35, mu = 0.8, A = 5, label = 'Test1')
# Extract time and growth data for single sample
time <- rnd.dataset$time[1,]
data <- as.numeric(rnd.dataset$data[1,-(1:3)]) # Remove identifier columns
plot(time, data)
print(low.integrate(time, data))
#> [1] 88.6072