
Split an Experiment
split.glyexp_experiment.Rd
Devides an experiment()
into a list of experiment()
objects by f
.
Usage
# S3 method for class 'glyexp_experiment'
split(x, f, drop = FALSE, where = "var_info", ...)
Arguments
- x
An
experiment()
.- f
<
data-masking
> A column invar_info
orsample_info
thatas.factor(f)
defines the grouping.- drop
Logical indicating if levels that do not occur should be dropped. Defaults to FALSE.
- where
Where to find the column, "var_info" or "sample_info".
- ...
Ignored
Value
A named list of experiment()
objects.
Examples
split(toy_experiment, group, where = "sample_info")
#> $A
#>
#> ── Glycoproteomics Experiment ──────────────────────────────────────────────────
#> ℹ Expression matrix: 3 samples, 4 variables
#> ℹ Sample information fields: group <chr>, batch <dbl>
#> ℹ Variable information fields: protein <chr>, peptide <chr>, glycan_composition <chr>
#>
#> $B
#>
#> ── Glycoproteomics Experiment ──────────────────────────────────────────────────
#> ℹ Expression matrix: 3 samples, 4 variables
#> ℹ Sample information fields: group <chr>, batch <dbl>
#> ℹ Variable information fields: protein <chr>, peptide <chr>, glycan_composition <chr>
#>