[Rd] slot named C

From: Paul Gilbert <pgilbert_at_bank-banque-canada.ca>
Date: Mon 17 Apr 2006 - 13:18:52 GMT

"C" appears to be an illegal name for a slot in an S4 class (example below). If this is a known limitation, and not a bug, it would be nice if it were caught by setClass.

Paul Gilbert

> setClass("testobj", representation ( C = "numeric"))
[1] "testobj"
> new("testobj", C= 2)

Error in methodsPackageMetaName("C", name) :

        'The name of the object (e.g,. a class or generic function) to find in the meta-data' must be a single string (got an object of class "numeric")

> setClass("testobj", representation ( C. = "numeric"))
[1] "testobj"
> new("testobj", C.= 2)

An object of class "testobj"
Slot "C.":
[1] 2

La version fran├žaise suit le texte anglais.

This email may contain privileged and/or confidential inform...{{dropped}}

R-devel@r-project.org mailing list
https://stat.ethz.ch/mailman/listinfo/r-devel Received on Mon Apr 17 23:21:59 2006

This archive was generated by hypermail 2.1.8 : Mon 17 Apr 2006 - 14:17:45 GMT