maximizeInterpolant {edgeR} | R Documentation |
Maximize a function given a table of values by spline interpolation.
maximizeInterpolant(x, z, maxit=10, eps=1e-7, plot=FALSE)
x |
numeric vector of the inputs of the function. |
z |
numeric vector of the values of the function at the inputs given by |
maxit |
numeric scalar giving the maximum number of iterations for the Newton-Raphson algorithm. |
eps |
numeric scalar giving the convergence tolerance. |
plot |
logical, whether or not to plot the function on those given points. |
maximizeInterpolant
calls the function splinefun
to fit cubic spline interpolation given a set of points.
maximizeInterpolant
uses Newton-Raphson algorithm in finding the maximum of the function performing the interpolation.
maximizeInterpolant
returns a single value which maximizes the spline interpolation.
Gordon Smyth
x <- seq(0,1,length=1000) y <- rnorm(1000,1,1) maximizeInterpolant(x,y)