Extend dplyr::mutate() to operate on the sampleTable slot of a
mesaDimRed object.
# S3 method for class 'mesaDimRed'
mutate(.data, ...)mesaDimRed
Object to modify.
Arguments passed to dplyr::mutate().
A mesaDimRed object:
sampleTable updated with the mutated columns.
Sample identity is preserved; attempts to alter sample_name are rejected.
data(exampleTumourNormal, package = "mesa")
md <- exampleTumourNormal %>%
getPCA() %>%
mutate(group2 = paste0(group, "_2"))
#> ------------------------------
#> Initial number of windows = 819.
#> -----------
#> Generating table of beta values for 819 regions across 10 samples.
#> -----------
#> Filtered out 220 windows with at least one missing value: 599 windows remaining.
#> ------------------------------
#> The following topVarNum values are larger than the number of remaining windows (= 599): 1000
#> These values are not used; PCA will be done with all remaining windows instead.
#> ------------------------------
#> No filtering of windows based on window standard deviation.
#> Performing PCA with 10 samples and 599 windows
#> -> pca1.
#> ------------------------------
stopifnot("group2" %in% colnames(getSampleTable(md)))