fitplane | R Documentation |
Fits a polynomial surface of order n
to a raster
or matrix.
fitplane(x, order)
x |
A raster or matrix. |
order |
Numeric. Indicates the polynomial order to be fit. |
A matrix with values predicted from the polynomial fit.
# import raster image
data(orforest)
orforest <- terra::unwrap(orforest)
# find the 2nd order least squares polynomial surface
polyfit <- fitplane(orforest, order = 2)
# create raster of polyfit
x <- terra::setValues(orforest, polyfit)
# plot the fit
terra::plot(x)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.