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

bind.fv

Combine Function Value Tables


Description

Advanced Use Only. Combine objects of class "fv", or glue extra columns of data onto an existing "fv" object.

Usage

## S3 method for class 'fv'
cbind(...)
bind.fv(x, y, labl = NULL, desc = NULL, preferred = NULL, clip=FALSE)

Arguments

...

Any number of arguments, which are objects of class "fv".

x

An object of class "fv".

y

Either a data frame or an object of class "fv".

labl

Plot labels (see fv) for columns of y. A character vector.

desc

Descriptions (see fv) for columns of y. A character vector.

preferred

Character string specifying the column which is to be the new recommended value of the function.

clip

Logical value indicating whether each object must have exactly the same domain, that is, the same sequence of values of the function argument (clip=FALSE, the default) or whether objects with different domains are permissible and will be restricted to a common domain (clip=TRUE).

Details

This documentation is provided for experienced programmers who want to modify the internal behaviour of spatstat.

The function cbind.fv is a method for the generic R function cbind. It combines any number of objects of class "fv" into a single object of class "fv". The objects must be compatible, in the sense that they have identical values of the function argument.

The function bind.fv is a lower level utility which glues additional columns onto an existing object x of class "fv". It has two modes of use:

  • If the additional dataset y is an object of class "fv", then x and y must be compatible as described above. Then the columns of y that contain function values will be appended to the object x.

  • Alternatively if y is a data frame, then y must have the same number of rows as x. All columns of y will be appended to x.

The arguments labl and desc provide plot labels and description strings (as described in fv) for the new columns. If y is an object of class "fv" then labl and desc are optional, and default to the relevant entries in the object y. If y is a data frame then labl and desc must be provided.

Value

An object of class "fv".

Author(s)

Adrian Baddeley Adrian.Baddeley@curtin.edu.au, Rolf Turner r.turner@auckland.ac.nz and Ege Rubak rubak@math.aau.dk.

See Also

Undocumented functions for modifying an "fv" object include fvnames, fvnames<-, tweak.fv.entry and rebadge.fv.

Examples

K1 <- Kest(cells, correction="border")
   K2 <- Kest(cells, correction="iso")

   # remove column 'theo' to avoid duplication
   K2 <- K2[, names(K2) != "theo"]

   cbind(K1, K2)

   bind.fv(K1, K2, preferred="iso")

   # constrain border estimate to be monotonically increasing
   bm <- cumsum(c(0, pmax(0, diff(K1$border))))
   bind.fv(K1, data.frame(bmono=bm),
               "%s[bmo](r)",
               "monotone border-corrected estimate of %s",
               "bmono")

spatstat.core

Core Functionality of the 'spatstat' Family

v2.1-2
GPL (>= 2)
Authors
Adrian Baddeley [aut, cre], Rolf Turner [aut], Ege Rubak [aut], Kasper Klitgaard Berthelsen [ctb], Achmad Choiruddin [ctb], Jean-Francois Coeurjolly [ctb], Ottmar Cronie [ctb], Tilman Davies [ctb], Julian Gilbey [ctb], Yongtao Guan [ctb], Ute Hahn [ctb], Kassel Hingee [ctb], Abdollah Jalilian [ctb], Marie-Colette van Lieshout [ctb], Greg McSwiggan [ctb], Tuomas Rajala [ctb], Suman Rakshit [ctb], Dominic Schuhmacher [ctb], Rasmus Plenge Waagepetersen [ctb], Hangsheng Wang [ctb]
Initial release
2021-04-17

We don't support your browser anymore

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