#' Function "geneES"
#'
#' This function constructs expression set for given matrix and pdata information
#' @importFrom stats aggregate
#' @importFrom Biobase ExpressionSet
#' @importFrom methods new
#' @param matrix a matrix for constructing the ExpressionSet object.
#' @param pdata a data frame for the pData.
#' @return an ExpressionSet obejct.
#' @export
geneES <- function(matrix, pdata) {
# create phenotype file
meta_phe <- data.frame(labelDescription=c('SampleID', 'Group'),
row.names=c('SampleID', 'Group'))
gene_phe <- new("AnnotatedDataFrame", data=pdata, varMetadata=meta_phe)
# construct ExpressionSet object from gene.exp and gene.phe
gene.es <- ExpressionSet(assayData=matrix, phenoData=gene_phe, annotation="hgu95av2")
# return result
return(gene.es)
}
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.