R/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())
}

Try the phantasus package in your browser

Any scripts or data that you put into this service are public.

phantasus documentation built on Nov. 8, 2020, 6:39 p.m.