logFitFun: Create function that calculates the log fit.

Description Usage Arguments Value See Also Examples

View source: R/turb.R

Description

Returns a function that computes the fitted log function of a set of points using logFit.

Usage

1
logFitFun(x, y)

Arguments

x

Vector containing x coordinates of the points.

y

Vector containing y coordinates of the points.

Value

Function that uses the fit parameters to estimate y.

See Also

logFit

Examples

1
2
3
4
5
6
x <- 1:10
y <- 3*log(x) + 1 + rnorm(10, sd=0.2)

fitfun <- logFitFun(x, y)
plot(x, y, xlab='x', ylab='y')
lines(x, fitfun(x))

tunelipt/wutils documentation built on Nov. 5, 2019, 11:01 a.m.