Functions to coerce an object to a list of class split_factors
, if
possible.
as.split_factors(x, verbose = TRUE)
x | The input data. |
---|---|
verbose | Logical argument. If |
An object of class split_factors
.
A dataframe may be easily coerced to be split into named subsets based on
each combination of factors existing in the original dataframe. For example,
if the original data has two columns, namely ENV (four levels) and HIB (ten
levels), and ten numeric columns, then using as.split_factors
will
split the data into 40 10-columns subsets, corresponding to each combination
of ENV x HIB.
#>spdata2 <- as.split_factors(CO2)#>is.split_factors(spdata2)#> [1] TRUE# }