spatstat (version 1.48-0)

unstack.ppp: Separate Multiple Columns of Marks

Description

Given a spatial pattern with several columns of marks, take one column at a time, and return a list of spatial patterns each having only one column of marks.

Usage

"unstack"(x, ...)
"unstack"(x, ...)
"unstack"(x, ...)

Arguments

x
A spatial point pattern (object of class "ppp" or "lpp") or a spatial pattern of line segments (object of class "psp").
...
Ignored.

Value

A list, of class "solist", whose entries are objects of the same type as x.

Details

The functions defined here are methods for the generic unstack. The functions expect a spatial object x which has several columns of marks; they separate the columns, and return a list of spatial objects, each having only one column of marks. If x has several columns of marks (i.e. marks(x) is a matrix, data frame or hyperframe with several columns), then y <- unstack(x) is a list of spatial objects, each of the same kind as x. The jth entry y[[j]] is equivalent to x except that it only includes the jth column of marks(x). If x has no marks, or has only a single column of marks, the result is a list consisting of one entry, which is x.

See Also

unstack

unstack.msr

See also methods for the generic split such as split.ppp.

Examples

Run this code
   finpines
   unstack(finpines)

Run the code above in your browser using DataCamp Workspace