by.exdf | R Documentation |
Divides an exdf
object into groups defined by one or more factors and
applies a function to each group.
## S3 method for class 'exdf'
by(data, INDICES, FUN, ...)
data |
An |
INDICES |
A factor or a list of factors. |
FUN |
A function whose first input argument is an |
... |
Additional arguments to be passed to |
Splits data
into chunks x
by the values of the INDICES
and calls FUN(x, ...)
for each chunk; returns a list where each
element is the output from each call to FUN
.
exdf
# Read a Licor file, split it into chunks according to the `species` column,
# and count the number of measurements for each species
licor_file <- read_gasex_file(
PhotoGEA_example_file_path('ball_berry_1.xlsx')
)
by(licor_file, licor_file[, 'species'], nrow)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.