fortify.psp: Fortify method for 'psp' objects

View source: R/vis.R

fortify.pspR Documentation

Fortify method for psp objects

Description

This method extracts coordinate and marks data from psp objects to a data.frame, so that it can be plotted with ggplot.

Usage

## S3 method for class 'psp'
fortify(model, data, ...)

Arguments

model

psp object

data

not used by this method

...

ignored by this method

Value

data.frame containing at least four columns: x0, x1, y0 and y1 with represent the coordinates of a line segement. Returned data.frame can also contain multiple other columns depending of the type of marks associated with the ppp object (see ppp). If mark type is:

  • vector: a single column with heading marks will be added.

  • data.frame: the marks data.frame with be column bound to the output data.frame, where the column headings from the marks data.frame are preserved.

See Also

psp


keithschulze/supr documentation built on Nov. 26, 2022, 7:09 a.m.