Why would you do this, when lists are fundamental types in R? --------------------------------------------------------------------------- Jeff Newmiller The ..... ..... Go Live... DCN:<jdnew...@dcn.davis.ca.us> Basics: ##.#. ##.#. Live Go... Live: OO#.. Dead: OO#.. Playing Research Engineer (Solar/Batteries O.O#. #.O#. with /Software/Embedded Controllers) .OO#. .OO#. rocks...1k --------------------------------------------------------------------------- Sent from my phone. Please excuse my brevity.
Shing Hing Man <mat...@yahoo.com> wrote: Hi, I am trying to create a linked list in R by defining a class Node which has a instance variable Node. setClass("Node", representation(rate="numeric", nextNode="ANY")) The above works. But the following gives me a warning message. setClass("Node", representation(rate="numeric", nextNode="Node")) > > setClass("Node", representation(rate="numeric", nextNode="ANY")) [1] "Node" > removeClass("Node") [1] TRUE > > setClass("Node", representation(rate="numeric", nextNode="Node")) [1] "Node" Warning message: undefined slot classes in definition of "Node": nextNode(class "Node") > In the case when nextNode is type Node, is it possible to get ride of the above "undefined slot classes" warning message ? Thanks in advance for any assistance! Shing_____________________________________________ R-help@r-project.org mailing list https://stat.ethz.ch/mailman/listinfo/r-help PLEASE do read the posting guide http://www.R-project.org/posting-guide.html and provide commented, minimal, self-contained, reproducible code. [[alternative HTML version deleted]] ______________________________________________ R-help@r-project.org mailing list https://stat.ethz.ch/mailman/listinfo/r-help PLEASE do read the posting guide http://www.R-project.org/posting-guide.html and provide commented, minimal, self-contained, reproducible code.