View source: R/interpolate_array.R
interpolate_array | R Documentation |
Given a series of X and Y coordinates and an array/matrix, interpolates the Z coordinate using bilinear interpolation.
interpolate_array(image, x, y)
image |
Image filename, a matrix, or a 3-layer RGB array. |
x |
X indices (or fractional index) to interpolate. |
y |
Y indices (or fractional index) to interpolate. |
Either a vector of values (if image is a matrix) or a list of interpolated values from each layer.
#if(interactive()){
#Interpolate a matrix
interpolate_array(volcano,c(10,10.1,11),c(30,30.5,33))
#Interpolate a 3-layer array (returns list for each channel)
interpolate_array(dragon,c(10,10.1,11),c(30,30.5,33))
#end}
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.