Obtain spatial partial effects of trained modelSource:
Similar as partial this function calculates a partial response
of a trained model for a given variable. Differently from partial in space.
However the result is a
SpatRaster showing the spatial magnitude of the
spartial(mod, x.var, constant = NULL, plot = FALSE, ...) # S4 method for ANY,character,ANY,logical spartial(mod,x.var,constant,plot,...) # S3 method for DistributionModel spartial(mod, ...)
DistributionModelobject with trained model.
A character indicating the variable for which a partial effect is to be calculated.
A logical indication of whether the result is to be plotted?
Other engine specific parameters.
A SpatRaster containing the mapped partial response of the variable.
By default the mean is calculated across all parameters that are
x.var. Instead a constant can be set (for instance
to be applied to the output.