interp2d: Interpolation of a table

Description Usage Arguments See Also Examples

Description

Return linear interpolation of a table. Can returns either the interpolation of the values of the table or the interpolations the columns associated with a value in the table(reverse).

Usage

1
interp2d(x0, y0, z0, x, y, reverse = FALSE, ...)

Arguments

x0

References in row of z.

y0

References in column of z

z0

Matrix representing a table to interpolate.

x

Point where to interpolate in row.

y

Point where to interpolate in column.

reverse

Logical. Should the Refrence value en y be interpolated instead of z.

See Also

approx

Examples

1
2
3
4
5
6
7
8
x <- 1:10
y <- 1:10
z <- outer(x,y)

interp2d(x,y,z,5,5) # 5*5  = 25
interp2d(x,y,z,5.1,5.1) # 26.01

interp2d(x,y,z,5.1,26, reverse = TRUE)

martindurocher/floodStat documentation built on May 31, 2019, 12:42 a.m.