split.exdf: Divide an exdf object into groups

View source: R/exdf.R

split.exdfR Documentation

Divide an exdf object into groups

Description

Divides an exdf object into groups defined by one or more factors.

Usage

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

Arguments

x

An exdf object.

f

A factor or a list of factors.

drop

A logical value indicating whether levels of f that do not occur should be dropped.

lex.order

A logical value passed to interaction.

...

Additional arguments to be passed to the default method of split.

Value

Returns a list of exdf objects created by splitting x along the values of f.

See Also

exdf

Examples

# Read a Licor file, select just a few columns, and then split it by the value
# of the `plot` column
licor_file <- read_gasex_file(
  PhotoGEA_example_file_path('ball_berry_1.xlsx')
)

licor_file <- licor_file[, c('plot', 'species', 'Qin', 'A', 'gsw'), TRUE]

split(
  licor_file,
  list(licor_file[,'species'], licor_file[,'plot']),
  drop = TRUE
)

PhotoGEA documentation built on April 11, 2025, 5:48 p.m.