remove_plane | R Documentation |
Finds the best fit polynomial surface for a raster or matrix and subtracts it from the actual values. The output image has positive values where the actual values are higher than the surface and negative values where the actual value are lower than the surface.
remove_plane(x)
x |
A raster or matrix. |
A raster or matrix of the same size as the input with values equal to the difference between the original and bestfit plane.
# import raster image
data(orforest)
orforest <- terra::unwrap(orforest)
# remove the least squares polynomial surface
new_rast <- remove_plane(orforest)
# plot
terra::plot(new_rast)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.