as.data.frame.ppp: Coerce Point Pattern to a Data Frame

Description Usage Arguments Details Value Author(s) Examples

View source: R/ppp.R

Description

Extracts the coordinates of the points in a point pattern, and their marks if any, and returns them in a data frame.

Usage

1
2
## S3 method for class 'ppp'
as.data.frame(x, row.names = NULL, ...)

Arguments

x

Point pattern (object of class "ppp").

row.names

Optional character vector of row names.

...

Ignored.

Details

This is a method for the generic function as.data.frame for the class "ppp" of point patterns.

It extracts the coordinates of the points in the point pattern, and returns them as columns named x and y in a data frame. If the points were marked, the marks are returned as a column named marks with the same type as in the point pattern dataset.

Value

A data frame.

Author(s)

\adrian

and \rolf

Examples

1
2
3

spatstat documentation built on May 20, 2017, 5:36 a.m.

Search within the spatstat package
Search all R packages, documentation and source code