[Rd] 'load' does not properly add 'show' methods for classes extending 'list'

Martin Morgan mtmorgan at fhcrc.org
Tue Sep 25 02:20:44 CEST 2007


The GeneSetCollection class in the Bioconductor package GSEABase
extends 'list'

> library(GSEABase)
> showClass("GeneSetCollection")

Slots:
            
Name:  .Data
Class:  list

Extends: 
Class "list", from data part
Class "vector", by class "list", distance 2
Class "AssayData", by class "list", distance 2

If I create an instance of this class and serialize it

> x <- GeneSetCollection(GeneSet("X"))
> x
GeneSetCollection
  names: NA (1 total)
> save(x, file="/tmp/x.rda")

and then start a new R session and load the data object (without first
library(GSEABase)), the 'show' method is not added to the appropriate
method table.

> load("/tmp/x.Rda")
> x
Loading required package: GSEABase
Loading required package: Biobase
Loading required package: tools

Welcome to Bioconductor

  Vignettes contain introductory material. To view, type
  'openVignette()'. To cite Bioconductor, see
  'citation("Biobase")' and for packages 'citation(pkgname)'.

Loading required package: AnnotationDbi
Loading required package: DBI
Loading required package: RSQLite
An object of class "GeneSetCollection"
[[1]]
setName: NA 
geneIds: X (total: 1)
geneIdType: Null 
collectionType: Null 
details: use 'details(object)'

Actually, the behavior is more complicate than appears; in a new R
session after loading /tmp/x.Rda, if I immediately do x[[1]] I get the
show,GeneSetCollection-method but not show,GeneSet-method.

Sorry for the somewhat obscure example.

Martin
-- 
Martin Morgan
Bioconductor / Computational Biology
http://bioconductor.org



More information about the R-devel mailing list