ibicubic: Bicubic interpolation on an array

Description Usage Arguments Value Examples

Description

First two dimensions of the array is interpolated by bicubic grid. Other dimensions are repeated. If xlim and ylim are not set, range of first two dimensions are used. If dx and dy are not set, half of the grid spacing is used. If x matrix/array has dimnames, they are used as coordinates of the rectangular grid.

Usage

1
ibicubic(x, xlim = NULL, ylim = xlim, dx = NULL, dy = dx, par = T)

Arguments

x

A matrix or higher dimensonal array containing the z[i,j] data values for the grid points (x[i],y[j]).

xlim

Lower and upper limits (x1, x2) for x-coordinate used for output.

ylim

Lower and upper limits (y1, y2) for y-coordinate used for output.

dx

Output grid spacing in x direction.

dy

Output grid spacing in y direction.

par

Use parallel package to interpolate.

Value

Interpolated array

Examples

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
x <- array(rnorm(1000), dim = c(10, 10, 10))
xi <- ibicubic(x)
str(xi) # should have dim = c(19, 19, 10)

x <- array(rnorm(1000), dim = c(10, 10, 10),
           dimnames = list(seq(2, 20, 2), seq(2, 20, 2), NULL))
xi <- ibicubic(x)
str(xi) # note dimnames

xi <- ibicubic(x, xlim = c(4, 6), ylim = c(6, 8))
str(xi) # note dimnames

isezen/rsezen documentation built on May 18, 2019, 5:49 a.m.