Become an expert in R — Interactive courses, Cheat Sheets, certificates and more!
Get Started for Free

as.data.frame.ppp

Coerce Point Pattern to a Data Frame


Description

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

Usage

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

and Rolf Turner r.turner@auckland.ac.nz

Examples

data(amacrine)
  df <- as.data.frame(amacrine)
  df[1:5,]

spatstat.geom

Geometrical Functionality of the 'spatstat' Family

v2.1-0
GPL (>= 2)
Authors
Adrian Baddeley [aut, cre], Rolf Turner [aut], Ege Rubak [aut], Tilman Davies [ctb], Ute Hahn [ctb], Abdollah Jalilian [ctb], Sebastian Meyer [ctb], Suman Rakshit [ctb], Dominic Schuhmacher [ctb], Rasmus Waagepetersen [ctb]
Initial release
2021-04-15

We don't support your browser anymore

Please choose more modern alternatives, such as Google Chrome or Mozilla Firefox.