[Rd] self-referential representations in S4

From: James Bullard <bullard_at_stat.berkeley.edu>
Date: Tue, 19 Apr 2011 15:10:00 -0700

I'm trying to do the following:

> setClass("MyNode", representation(parent = "MyNode"))
[1] "MyNode"

Warning message:
undefined slot classes in definition of "MyNode": parent(class "MyNode")

I scanned the docs, but found nothing. The representation function has no problem, it's the setClass function which gives the warning.

What I'm trying to understand is why have the warning - it seems to work just fine when I instantiate the class. Can we add an argument to the setClass to suppress the warning?

This question was asked previously, but not answered in any satisfactory way:

http://r.789695.n4.nabble.com/Linked-List-in-R-td3303021.html

thanks, jim

R version 2.12.2 Patched (2011-03-09 r54717) Platform: x86_64-unknown-linux-gnu (64-bit)

locale:

 [1] LC_CTYPE=en_US.UTF-8       LC_NUMERIC=C
 [3] LC_TIME=en_US.UTF-8        LC_COLLATE=en_US.UTF-8
 [5] LC_MONETARY=C              LC_MESSAGES=en_US.UTF-8
 [7] LC_PAPER=en_US.UTF-8       LC_NAME=C
 [9] LC_ADDRESS=C               LC_TELEPHONE=C

[11] LC_MEASUREMENT=en_US.UTF-8 LC_IDENTIFICATION=C

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

other attached packages:
[1] h5r_1.1

loaded via a namespace (and not attached):
[1] tools_2.12.2



R-devel_at_r-project.org mailing list
https://stat.ethz.ch/mailman/listinfo/r-devel Received on Tue 19 Apr 2011 - 22:12:48 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 Wed 20 Apr 2011 - 17:10:50 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.

list of date sections of archive