plot.rppm: Plot a Recursively Partitioned Point Process Model

plot.rppmR Documentation

Plot a Recursively Partitioned Point Process Model

Description

Given a model which has been fitted to point pattern data by recursive partitioning, plot the partition tree or the fitted intensity.

Usage

## S3 method for class 'rppm'
plot(x, ..., what = c("tree", "spatial"), treeplot=NULL)

Arguments

x

Fitted point process model of class "rppm" produced by the function rppm.

what

Character string (partially matched) specifying whether to plot the partition tree or the fitted intensity.

...

Arguments passed to plot.rpart and text.rpart (if what="tree") or passed to plot.im (if what="spatial") controlling the appearance of the plot.

treeplot

Optional. A function to be used to plot and label the partition tree, replacing the two functions plot.rpart and text.rpart.

Details

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.

Value

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.

Author(s)

\spatstatAuthors

See Also

rppm

Examples

    # 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)

spatstat.core documentation built on May 18, 2022, 9:05 a.m.