Entering edit mode
Thomas Elliott
▴
20
@thomas-elliott-2422
Last seen 10.2 years ago
I am new to R and Bioconductor. I'm exploring using the
ExpressionSet object provided in Bioconductor Biobase package called
sample.ExpressionSet. I'm troubled because what looks like the same
object behaves very differently depending on my "history."
With a clean history (.Rhistory and .Rdata deleted), I get this:
> library("genefilter")
> data(sample.ExpressionSet)
> eset = sample.ExpressionSet
> eset
ExpressionSet (storageMode: lockedEnvironment)
assayData: 500 features, 26 samples
element names: exprs, se.exprs
and this call (and others like it) work:
> varLabels(eset)
[1] "sex" "type" "score"
But if I now quit and save history, then start again and go:
> eset
An object of class ?ExpressionSet?
Slot "assayData":
<environment: 0xd2eac54="">
The output is very different, and this call (and others like it)
don't work:
> varLabels(eset)
Error: could not find function "varLabels"
The two objects are closely related. For example, this call gives
the same result:
> class(eset)
[1] "ExpressionSet"
attr(,"package")
[1] "Biobase"
If I then go
> library("genefilter")
> data(sample.ExpressionSet)
and **without reassigning to eset**, I get the first behavior.
How can the same object behave so differently? This is deeply
unnerving to me coming to R from Python.
Also, it seems obvious that one is an older way of doing things. How
do I know which way is up to date? This is a general issue when many
Vignettes reference older things like exprSet objects. I assume the
old stuff is left in for backwards compatibility but it is an obvious
source of confusion to the newcomer.
Thanks for any insight.
Tom Elliott
Biobase 1.16.0, genefilter 1.16.0
R 2.6.0 GUI 1.21 (4815) on OS X 10.4.10