https://github.com/ctlab/phantasus
Raw File
Tip revision: 74a0eb7154371c83f9a7881ddd136eff08523754 authored by Alexey Sergushichev on 30 January 2020, 16:08:00 UTC
Remove dependency on Matrix.utils fix #152
Tip revision: 74a0eb7
renameColumn.R
renameColumn <- function (es, isFeature = TRUE, oldName, newName) {
    if (isFeature) {
        fData(es)[[newName]] <- fData(es)[[oldName]]
        fData(es)[[oldName]] <- NULL
    } else {
        phenoData(es)[[newName]] <- phenoData(es)[[oldName]]
        phenoData(es)[[oldName]] <- NULL
    }

    assign("es", es, envir = parent.frame())
}
back to top