[Rd] S4 'object is not subsettable' in prototype

Martin Morgan mtmorgan at fhcrc.org
Fri Aug 18 00:35:53 CEST 2006


Extracting prototype structure apparently relies on list properties of
the earlier S4 implementation.

Martin

> setClass("A", representation(x="numeric"))
[1] "A"
> str(getClass("A"))
Formal class 'classRepresentation' [package "methods"] with 11 slots
  ..@ slots     :List of 1
  .. ..$ x: atomic [1:1] numeric
  .. .. ..- attr(*, "package")= chr "methods"
  ..@ contains  : list()
  ..@ virtual   : logi FALSE
  ..@ prototype :Error in object[1:ile] : object is not subsettable
> sessionInfo()
R version 2.4.0 Under development (unstable) (2006-08-17 r38916) 
x86_64-unknown-linux-gnu 

locale:
LC_CTYPE=en_US;LC_NUMERIC=C;LC_TIME=en_US;LC_COLLATE=en_US;LC_MONETARY=en_US;LC_MESSAGES=en_US;LC_PAPER=en_US;LC_NAME=C;LC_ADDRESS=C;LC_TELEPHONE=C;LC_MEASUREMENT=en_US;LC_IDENTIFICATION=C

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



More information about the R-devel mailing list