Skip to content
Prev 380429 / 398500 Next

How to create a data set from object/data frame?

Sarah,

  I am trying to extract phenoData (ie sample information) from the object
as part of a procedure to analyze my array for probe sets, which I realize
is under the BioConducter package Biobase and not relevant to this mailing
list.

  Yes the original procedure uses data from the Dilution dataset hosted in
the AffyBatch package affydata. Previous to this part of the procedure, a
dataset was create via..

  >fake.data <- matrix(rnorm(8*200), ncol=8)
##Then phenotype (sample) data was generated in this example through... ##

  sample.info <- data.frame( + spl=paste('A', 1:8, sep=''), +
stat=rep(c('cancer' , 'healthy'), each=4))

##Then a meta data.frame object was created to give more intelligible
labels##
Status')) Then we put them all together: > pheno <-
new("AnnotatedDataFrame", + data = sample.info, + varMetadata = meta.info)

##Which was then aggregated together##
meta.info)

  >my.experiments <- new("ExpressionSet", + exprs=fake.data,
phenoData=pheno)
   > my.experiments
ExpressionSet (storageMode: lockedEnvironment) assayData: 200 features, 8
samples element names: exprs

##The following deals with further manipulating the phenoData##
phenoData
   sampleNames: 1, 2, ..., 8 (8 total) varLabels and varMetadata
description: spl: Sample Name stat: Cancer Status

featureData
 featureNames: 1, 2, ..., 200 (200 total) fvarLabels and fvarMetadata
description: none
experimentData:  use 'experimentData(object)'
Annotation:

##At this point is when the dataset 'Dilution was read in through
data(Dilution)

which was made an object of the AnnotatedDataFrame via
My apologies in advance as I know the above info. pertains to functions
carried out strictly through BioConducor, but is the only context I can
provide for what I am trying to do.

Best,

Spencer


On Fri, Jul 19, 2019 at 10:23 AM Sarah Goslee <sarah.goslee at gmail.com>
wrote: