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

split.hyperframe

Divide Hyperframe Into Subsets and Reassemble


Description

split divides the data x into subsets defined by f. The replacement form replaces values corresponding to such a division.

Usage

## S3 method for class 'hyperframe'
split(x, f, drop = FALSE, ...)

  ## S3 replacement method for class 'hyperframe'
split(x, f, drop = FALSE, ...) <- value

Arguments

x

Hyperframe (object of class "hyperframe").

f

a factor in the sense that as.factor(f) defines the grouping, or a list of such factors in which case their interaction is used for the grouping.

drop

logical value, indicating whether levels that do not occur should be dropped from the result.

value

a list of hyperframes which arose (or could have arisen) from the command split(x,f,drop=drop).

...

Ignored.

Details

These are methods for the generic functions split and split<- for hyperframes (objects of class "hyperframe").

A hyperframe is like a data frame, except that its entries can be objects of any kind. The behaviour of these methods is analogous to the corresponding methods for data frames.

Value

The value returned from split.hyperframe is a list of hyperframe containing the values for the groups. The components of the list are named by the levels of f (after converting to a factor, or if already a factor and drop = TRUE, dropping unused levels).

The replacement method split<-.hyperframe returns a new hyperframe x for which split(x,f) equals value.

Author(s)

and Ege Rubak rubak@math.aau.dk

See Also

Examples

split(pyramidal, pyramidal$group)

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.