collapse.fv | R Documentation |
Combines several function tables (objects of class "fv"
)
into a single function table, merging columns that are identical
and relabelling columns that are different.
## S3 method for class 'fv' collapse(object, ..., same = NULL, different = NULL) ## S3 method for class 'anylist' collapse(object, ..., same = NULL, different = NULL)
object |
An object of class |
... |
Additional objects of class |
same |
Character string or character vector specifying a column or columns
of function values that are identical in different |
different |
Character string or character vector specifying a column or columns
of function values, that are different in different |
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.
(This can be ensured by applying harmonise.fv
to them.)
The argument same
identifies any columns that are present
in some or all of the function tables, and
which are known to contain exactly the same values in each table
that includes them. This column or columns will be
included only once in the result.
The argument different
identifies any columns that are present
in some or all of the function tables, and which may contain
different numerical values in different tables.
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.
The function argument is always included and does not need to be specified.
The arguments same
and different
can be NULL
,
or they can be character vectors containing the names
of columns of object
. The argument different
can be
one of the abbreviations recognised by fvnames
.
Object of class "fv"
.
and \rolf
fv.object
,
cbind.fv
# 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
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.