split.intensity {epiphy} | R Documentation |
Divide into groups and reassemble.
Description
Divide into groups and reassemble.
Usage
## S3 method for class 'intensity'
split(x, f, drop = FALSE, ..., by, unit_size)
Arguments
x |
vector or data frame containing values to be divided into groups. |
f |
a ‘factor’ in the sense that |
drop |
logical indicating if levels that do not occur should be dropped
(if |
... |
further potential arguments passed to methods. |
by |
The name(s) of the variable(s) which define(s) the grouping. |
unit_size |
Size of a group unit. It must be a named vector, with names
corresponding to non-observational variables (i.e. space and time
variables). If the size of a variable in the data set is not a multiple
of the provided value in |
Value
A list of intensity
objects.
Examples
my_incidence <- incidence(tomato_tswv$field_1929)
plot(my_incidence, type = "all")
my_incidence_spl1 <- split(my_incidence, by = "t")
my_incidence_spl2 <- split(my_incidence, unit_size = c(x = 8, y = 20, t = 1))