R/editcolnames.R

Defines functions editcolnames

Documented in editcolnames

editcolnames <- function(y)
{
    colnames(y) <- if (
        length(
            grep("^X[\\d]", colnames(y), perl=TRUE)
        ) != 0
    ) {
        gsub("^X([\\d].*)", "\\1", colnames(y), perl=TRUE)
    } else {
        colnames(y)
    }
    
    return(y)
}

Try the metabolomics package in your browser

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

metabolomics documentation built on May 29, 2017, 3:32 p.m.