get.smooth {tempR}R Documentation

Convenience function for curve smoothing

Description

Smooth TCATA curves, constraining smooth within low.bound and up.bound.

Usage

get.smooth(y, w = NULL, spar = 0.5, low.bound = 0, up.bound = 1)

Arguments

y

the vector of proportions (or counts) to be smoothed. If a data frame is provided then smoothing is conducted on each row.

w

an optional vector of weights; see smooth.spline

spar

smoothing parameter; see smooth.spline

low.bound

lower bound for smoothed proportions

up.bound

upper bound for smoothed proportions

Value

out smoothed vector (or data frame with smoothed rows)

References

Castura, J.C., AntĂșnez, L., GimĂ©nez, A., Ares, G. (2016). Temporal check-all-that-apply (TCATA): A novel temporal sensory method for characterizing products. Food Quality and Preference, 47, 79-90. doi:10.1016/j.foodqual.2015.06.017

See Also

smooth.spline, predict

Examples

# example using 'syrah' data set
low1 <- t(syrah[seq(3, 1026, by = 6), -c(1:4)])
colnames(low1) <- 10:180
x <- get.smooth(low1)
round(x, 3)

[Package tempR version 0.10.1.1 Index]