[Bioc-devel] Can't set featureNames on naive ExpressionSet object

Gordon K Smyth smyth at wehi.EDU.AU
Sat Jun 28 04:31:56 CEST 2008


Why can't I set featureNames?  Why is sampleNames() called internally 
when the user has not asked for it?

Gordon

> narrays <- 4
> nprobes <- 100
> eset <- new("ExpressionSet")
> exprs(eset) <- matrix(rnorm(nprobes*narrays),nprobes,narrays)
> featureNames(eset) <- paste("Gene",1:nprobes,sep="")
Error in `sampleNames<-`(`*tmp*`, value = c("Gene1", "Gene2", "Gene3",  :
   number of new names (100) should equal number of rows in 
AnnotatedDataFrame (0)


> sessionInfo()
R version 2.7.1 (2008-06-23)
i386-pc-mingw32

locale:
LC_COLLATE=English_Australia.1252;LC_CTYPE=English_Australia.1252;LC_MONETARY=English_Australia.1252;LC_NUMERIC=C;LC_TIME=English_Australia.1252

attached base packages:
[1] tools     stats     graphics  grDevices utils     datasets  methods 
base

other attached packages:
[1] Biobase_2.0.0



More information about the Bioc-devel mailing list