[Rd] Unexpected side effect of the ":::" operator on the value of isGeneric

Wolfgang Huber huber at ebi.ac.uk
Wed Feb 25 19:15:03 CET 2009


Hi,

when running the following on a fresh R,


  library("IRanges")
  annotation
  showMethods("annotation")
  Biobase:::annotation
  showMethods("annotation")


I get (see the "^^^^^" marked output at the bottom):


> library("IRanges")

Carico il pacchetto richiesto: 'IRanges'

	The following object(s) are masked from package:base :

	 cbind,
	 order,
	 pmax,
	 pmax.int,
	 pmin,
	 pmin.int,
	 rbind,
	 rep.int,
	 table

> annotation
standardGeneric for "annotation" defined from package "IRanges"

function (x, ...)
standardGeneric("annotation")
<environment: 0x1a302b0>
Methods may be defined for arguments: x
Use  showMethods("annotation")  for currently available ones.

> showMethods("annotation")
Function: annotation (package IRanges)
x="AnnotatedList"

> Biobase:::annotation
standardGeneric for "annotation" defined from package "Biobase"

function (object)
standardGeneric("annotation")
<environment: 0x205cee0>
Methods may be defined for arguments: object
Use  showMethods("annotation")  for currently available ones.

> showMethods("annotation")

Function "annotation":
 <not a generic function>
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^


It seems that the value of isGeneric("annotation"), when it is called
within showMethods, is FALSE, while it is TRUE when called outside.



> sessionInfo()
R version 2.9.0 Under development (unstable) (2009-02-25 r48007)
x86_64-unknown-linux-gnu

locale:
LC_CTYPE=it_IT.UTF-8;LC_NUMERIC=C;LC_TIME=it_IT.UTF-8;LC_COLLATE=it_IT.UTF-8;LC_MONETARY=C;LC_MESSAGES=it_IT.UTF-8;LC_PAPER=it_IT.UTF-8;LC_NAME=C;LC_ADDRESS=C;LC_TELEPHONE=C;LC_MEASUREMENT=it_IT.UTF-8;LC_IDENTIFICATION=C

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

other attached packages:
[1] IRanges_1.1.40

loaded via a namespace (and not attached):
[1] Biobase_2.3.10



Best wishes
 Wolfgang

------------------------------------------------------------------
Wolfgang Huber  EBI/EMBL  Cambridge UK  http://www.ebi.ac.uk/huber



More information about the R-devel mailing list