Resize a native raster by specifying the output dimensions

nr_resize(nr, width, height, algo = "nn")

Arguments

nr

native raster image

width, height

dimensions for output image

algo

'nn' for nearest neighbor (the default), or 'bilinear' for bilinear interpolation.

Value

New native raster image

See also

Other resizing functions: nr_scale()

Examples

stretched <- nr_resize(deer[[1]], 100, 40, algo = 'nn')
plot(stretched)