plot.rppm | R Documentation |
Given a model which has been fitted to point pattern data by recursive partitioning, plot the partition tree or the fitted intensity.
## S3 method for class 'rppm' plot(x, ..., what = c("tree", "spatial"), treeplot=NULL)
x |
Fitted point process model of class |
what |
Character string (partially matched) specifying whether to plot the partition tree or the fitted intensity. |
... |
Arguments passed to |
treeplot |
Optional. A function to be used to plot and label the partition tree,
replacing the two functions |
If what="tree"
(the default), the partition tree will be plotted
using plot.rpart
, and labelled using
text.rpart
.
If the argument treeplot
is
given, then plotting and labelling will be performed by
treeplot
instead. A good choice is the function
prp
in package rpart.plot.
If what="spatial"
, the predicted intensity
will be computed using predict.rppm
, and
this intensity will be plotted as an image using plot.im
.
If what="tree"
, a list containing x
and y
coordinates of the plotted nodes of the tree.
If what="spatial"
, the return value of plot.im
.
rppm
# Murchison gold data mur <- solapply(murchison, rescale, s=1000, unitname="km") mur$dfault <- distfun(mur$faults) # fit <- rppm(gold ~ dfault + greenstone, data=mur) # opa <- par(mfrow=c(1,2)) plot(fit) plot(fit, what="spatial") par(opa)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.