Note that the prediction data set must have x
and y
columns even if
these were not used in the model.
# S3 method for dsm.var
plot(
x,
poly = NULL,
limits = NULL,
breaks = NULL,
legend.breaks = NULL,
xlab = "x",
ylab = "y",
observations = TRUE,
plot = TRUE,
boxplot.coef = 1.5,
x.name = "x",
y.name = "y",
gg.grad = NULL,
...
)
a plot
a dsm.var
object
a list
or data.frame
with columns x
and y
, which gives
the coordinates of a polygon to draw. It may also optionally have a column
group
, if there are many polygons.
limits for the fill colours
breaks for the colour fill
breaks as they should be displayed
label for the x
axis
label for the y
axis
should observations be plotted?
actually plot the map, or just return a ggplot2
object?
control trimming (as in
summary.dsm.var
), only has an effect if the bootstrap
file was saved.
name of the variable to plot as the x
axis.
name of the variable to plot as the y
axis.
optional ggplot
gradient object.
any other arguments
David L. Miller
In order to get plotting to work with dsm_var_prop
and
dsm_var_gam
, one must first format the data correctly
since these functions are designed to compute very general summaries. One
summary is calculated for each element of the list pred
supplied to
dsm_var_prop
and dsm_var_gam
.
For a plot of uncertainty over a prediction grid, pred
(a data.frame
),
say, we can create the correct format by simply using pred.new <- split(pred,1:nrow(pred))
.
dsm_var_prop
, dsm_var_gam
,
dsm_var_movblk