resample function uses a kernel function to resample a target
array. This can be thought of as a generalisation of array indexing which
allows fractional indices. It is (S3) generic. The rescale function
is an alternative interface for the common case where the image is being
scaled to a new size.resample(x, points, kernel, ...)## S3 method for class 'default':
resample(x, points, kernel, pointType = c("auto", "general",
"grid"), ...)
rescale(x, factor, kernel, ...)
"auto".x.points a
matrix), the result is a vector of sampled values. For a grid scheme (i.e.
with points a list, including for rescale), it is a
resampled array.kernels for kernel-generating functions.resample(c(0,0,1,0,0), seq(0.75,5.25,0.5), triangleKernel())Run the code above in your browser using DataLab