collapse.fv

0th

Percentile

Collapse Several Function Tables into One

Combines several function tables (objects of class "fv") into a single function table, merging columns that are identical and relabelling columns that are different.

Keywords
manip, spatial
Usage
# S3 method for fv
collapse(object, …, same = NULL, different = NULL)

# S3 method for anylist collapse(object, …, same = NULL, different = NULL)

Arguments
object

An object of class "fv", or a list of such objects.

Additional objects of class "fv".

same

Character string or character vector specifying a column or columns, present in each "fv" object, that are identical in each object. This column or columns will be included only once.

different

Character string or character vector specifying a column or columns, present in each "fv" object, that contain different values in each object. Each of these columns of data will be included, with labels that distinguish them from each other.

Details

This is a method for the generic function collapse.

It combines the data in several function tables (objects of class "fv", see fv.object) to make a single function table. It is essentially a smart wrapper for cbind.fv.

A typical application is to calculate the same summary statistic (such as the \(K\) function) for different point patterns, and then to use collapse.fv to combine the results into a single object that can easily be plotted. See the Examples.

The arguments object and should be function tables (objects of class "fv", see fv.object) that are compatible in the sense that they have the same values of the function argument.

The argument same identifies any columns that are present in each function table, and which are known to contain exactly the same values in each table. This column or columns will be included only once in the result.

The argument different identifies any columns that are present in each function table, and which contain different numerical values in each table. Each of these columns will be included, with labels to distinguish them.

Columns that are not named in same or different will not be included.

Value

Object of class "fv".

See Also

fv.object, cbind.fv

Aliases
  • collapse.fv
  • collapse.anylist
Examples
# NOT RUN {
  # generate simulated data
  X <- replicate(3, rpoispp(100), simplify=FALSE)
  names(X) <- paste("Simulation", 1:3)
  # compute K function estimates
  Klist <- anylapply(X, Kest)
  # collapse
  K <- collapse(Klist, same="theo", different="iso")
  K
# }
Documentation reproduced from package spatstat, version 1.57-1, License: GPL (>= 2)

Community examples

Looks like there are no examples yet.