Learn R Programming

spatstat.geom (version 3.6-1)

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 hyperframe
split(x, f, drop = FALSE, ...)

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

Arguments

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.

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.

See Also

hyperframe, [.hyperframe

Examples

Run this code
   split(pyramidal, pyramidal$group)

Run the code above in your browser using DataLab