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

cbind.hyperframe

Combine Hyperframes by Rows or by Columns


Description

Methods for cbind and rbind for hyperframes.

Usage

## S3 method for class 'hyperframe'
cbind(...)
## S3 method for class 'hyperframe'
rbind(...)

Arguments

...

Any number of hyperframes (objects of class hyperframe).

Details

These are methods for cbind and rbind for hyperframes.

Note that all the arguments must be hyperframes (because of the peculiar dispatch rules of cbind and rbind).

To combine a hyperframe with a data frame, one should either convert the data frame to a hyperframe using as.hyperframe, or explicitly invoke the function cbind.hyperframe or rbind.hyperframe.

In other words: if h is a hyperframe and d is a data frame, the result of cbind(h,d) will be the same as cbind(as.data.frame(h), d), so that all hypercolumns of h will be deleted (and a warning will be issued). To combine h with d so that all columns of h are retained, type either cbind(h, as.hyperframe(d)) or cbind.hyperframe(h,d).

Value

Another hyperframe.

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

Examples

if(require(spatstat.core)) {
  lambda <- runif(5, min=10, max=30)
  X <- lapply(as.list(lambda), function(x) { rpoispp(x) })
  h <- hyperframe(lambda=lambda, X=X)
  g <- hyperframe(id=letters[1:5], Y=rev(X))
  gh <- cbind(h, g)
  hh <- rbind(h[1:2, ], h[3: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.