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

From: Martin Morgan <mtmorgan_at_fhcrc.org>
Date: Mon, 24 Sep 2007 17:20:44 -0700


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

______________________________________________
R-devel_at_r-project.org mailing list
https://stat.ethz.ch/mailman/listinfo/r-devel
Received on Tue 25 Sep 2007 - 00:25:37 GMT

Archive maintained by Robert King, hosted by the discipline of statistics at the University of Newcastle, Australia.
Archive generated by hypermail 2.2.0, at Tue 25 Sep 2007 - 12:41:05 GMT.

Mailing list information is available at https://stat.ethz.ch/mailman/listinfo/r-devel. Please read the posting guide before posting to the list.