Description Usage Arguments Value Old implementation Examples
Returns columns from phenoData that start with "color_" and have their suffix in common with another column;
Names of colors are set from the associated column, e.g., list(color_Sex = stats::setNames(color_Sex, Sex), ...)
1 | getColPats(eset)
|
eset |
ExpressionSet |
List of colors, each of length equal to the number of rows in phenoData
getColPats <- function(eset) {
assertthat::has_attr(eset, "phenoData")
colPats <- list()
aNames <- colnames(Biobase::pData(eset))
cNames <- aNames[grep("^color_", aNames, perl=TRUE)]
fNames <- sub("^color_", "", cNames)
for (i in seq_len(length(fNames))) {
colPats[[fNames[i]]] <- stats::setNames(Biobase::pData(eset)[[cNames[i]]], Biobase::pData(eset)[[fNames[i]]])
}
colPats
}
1 2 3 4 5 | ## Not run:
getColPats(Biobase::pData(dataRaw/eset))
getColPats(Biobase::pData(eset))
## End(Not run)
|
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.