predictCurve: Predict curve values

View source: R/curveFit_utils.R

predictCurveR Documentation

Predict curve values

Description

Evaluate fitted curve values at x data points

Usage

predictCurve(fittedCurve, x)

Arguments

fittedCurve

(peakPantheR_curveFit) A 'peakPantheR_curveFit': a list of curve fitting parameters, curve shape model curveModel and nls.lm fit status fitStatus.

x

(numeric) values at which to evaluate the fitted curve

Details

## Examples cannot be computed as the function is not exported: ## Input a fitted curve fittedCurve <- list(amplitude=275371.1, center=3382.577, sigma=0.07904697, gamma=0.001147647, fitStatus=2, curveModel='skewedGaussian') class(fittedCurve) <- 'peakPantheR_curveFit' input_x <- c(3290, 3300, 3310, 3320, 3330, 3340, 3350, 3360, 3370, 3380, 3390, 3400, 3410)

## Predict y at each input_x pred_y <- predictCurve(fittedCurve, input_x) pred_y # [1] 2.347729e-08 1.282668e-05 3.475590e-03 4.676579e-01 3.129420e+01 # [6] 1.043341e+03 1.736915e+04 1.447754e+05 6.061808e+05 1.280037e+06 # [11] 1.369651e+06 7.467333e+05 2.087477e+05

Value

fitted curve values at x


phenomecentre/peakPantheR documentation built on Feb. 29, 2024, 9:07 p.m.