interpolate: Interpolate Values of Array

Description Usage Arguments Author(s) See Also Examples

Description

For each row in matrix x, the hypercube of a containing this point is searched. The corners of the hypercube are linearly interpolated. By default, dimnames(a) is taken to contain the coordinate values for each point in a. This can be overridden using adims. If method=="constant", the value of the “lower left” corner of the hypercube is returned.

Usage

1
2
interpolate(x, a, adims=lapply(dimnames(a), as.numeric),
            method="linear")

Arguments

x

Matrix of values at which interpolation shall take place.

a

Array of arbitrary dimension.

adims

List of the same structure as dimnames(a).

method

Interpolation method, one of "linear" or "constant".

Author(s)

Friedrich Leisch

See Also

approx, spline

Examples

1
2
3
4
5
x <- seq(0,3,0.2)
z <- outer(x,x, function(x,y) sin(x*y))
dimnames(z) <- list(x,x)
sin(1.1*2.1)
interpolate(c(1.1, 2.1),z)


Search within the e1071 package
Search all R packages, documentation and source code

Questions? Problems? Suggestions? or email at ian@mutexlabs.com.

Please suggest features or report bugs with the GitHub issue tracker.

All documentation is copyright its authors; we didn't write any of that.