You can not instantiate eSet
objects because eSet
is a virtual class. You can convince yourself by typing getClass("eSet")
. However, you can create objects from the subclasses of eSet
, that are not virtual: ExpressionSet
, NChannelSet
, ...
If you want to create an ExpressionSet
for instance, you should probably use the constructor ExpressionSet(...)
to do so. Have a look at the Examples section in ?ExpressionSet
. Using new("ExpressionSet",...)
would also work but is not the recommended way, unless you know what you are doing.
> assaydata <- matrix(rnorm(1000),100,10) ## matrix, not dataframe
> phenodata <- new("AnnotatedDataFrame",data=data.frame(A=letters[1:10],B=1:10))
> featuredata <- new("AnnotatedDataFrame",data=data.frame(a=1:100,b=100:1))
> eset <- ExpressionSet(assayData=assaydata,phenoData=phenodata,featureData=featuredata)
> eset
ExpressionSet (storageMode: lockedEnvironment)
assayData: 100 features, 10 samples
element names: exprs
protocolData: none
phenoData
sampleNames: 1 2 ... 10 (10 total)
varLabels: A B
varMetadata: labelDescription
featureData
featureNames: 1 2 ... 100 (100 total)
fvarLabels: a b
fvarMetadata: labelDescription
experimentData: use 'experimentData(object)'
Annotation:
You might also be interested in ?readExpressionSet
if you have you expression data and meta data in spreadsheet files.
Hope this helps.
Also, have a look at the Biobase vignettes.