Unite interesting groups into a single column
Source:R/AllGenerics.R
, R/uniteInterestingGroups-methods.R
uniteInterestingGroups.Rd
Create a single interesting groups column (interestingGroups
) used for
coloring in plots. When multiple interesting groups are present, unite into a
single column, delimited by a colon.
Usage
uniteInterestingGroups(object, ...)
# S4 method for DFrame
uniteInterestingGroups(object, interestingGroups)
Arguments
- object
Object.
- interestingGroups
character
. Groups of interest to use for visualization. Corresponds to factors describing the columns of the object.- ...
Additional arguments.
Examples
data(RangedSummarizedExperiment, package = "AcidTest")
rse <- RangedSummarizedExperiment
## DFrame ====
object <- rse
x <- uniteInterestingGroups(
object = sampleData(object),
interestingGroups = interestingGroups(object)
)
print(x)
#> DataFrame with 12 rows and 3 columns
#> condition sampleName interestingGroups
#> <factor> <factor> <factor>
#> sample01 A sample01 A
#> sample02 A sample02 A
#> sample03 A sample03 A
#> sample04 A sample04 A
#> sample05 A sample05 A
#> ... ... ... ...
#> sample08 B sample08 B
#> sample09 B sample09 B
#> sample10 B sample10 B
#> sample11 B sample11 B
#> sample12 B sample12 B