Is there any good source of information on how S4 classes (and methods) work from C? E.g., for reading how to read a slot value how to invoke a method how to test if you have an s4 object For writing, how to make a new instance of an S4 object. I've found scattered hints in the archive, including a link to a talk on this subject "I am using C code to create an S4 object based on Douglas Bates's example in his lecture notes on <http://www.ci.tuwien.ac.at/Conferences/DSC-2003/Tutorials/RExtensions/slide s.pdf>" but the link is no longer good (after putting it all on one line). "Writing R Extensions" (2.3.0 version) makes no reference to this topic that I can see. -- Ross Boylan wk: (415) 514-8146 185 Berry St #5700 ross at biostat.ucsf.edu Dept of Epidemiology and Biostatistics fax: (415) 514-8150 University of California, San Francisco San Francisco, CA 94107-1739 hm: (415) 550-1062
I believe the paper on which those lecture notes were based can be found here: http://www.ci.tuwien.ac.at/Conferences/DSC-2003/Drafts/BatesDebRoy.pdf -----Original Message----- From: r-devel-bounces at r-project.org [mailto:r-devel-bounces at r-project.org] On Behalf Of Ross Boylan Sent: Thursday, May 18, 2006 1:45 PM To: R Development List Subject: [Rd] S4 classes and C Is there any good source of information on how S4 classes (and methods) work from C? E.g., for reading how to read a slot value how to invoke a method how to test if you have an s4 object For writing, how to make a new instance of an S4 object. I've found scattered hints in the archive, including a link to a talk on this subject "I am using C code to create an S4 object based on Douglas Bates's example in his lecture notes on <http://www.ci.tuwien.ac.at/Conferences/DSC-2003/Tutorials/RExtensions/s lide s.pdf>" but the link is no longer good (after putting it all on one line). "Writing R Extensions" (2.3.0 version) makes no reference to this topic that I can see. -- Ross Boylan wk: (415) 514-8146 185 Berry St #5700 ross at biostat.ucsf.edu Dept of Epidemiology and Biostatistics fax: (415) 514-8150 University of California, San Francisco San Francisco, CA 94107-1739 hm: (415) 550-1062 ______________________________________________ R-devel at r-project.org mailing list https://stat.ethz.ch/mailman/listinfo/r-devel
On Thu, 2006-05-18 at 13:53 -0400, McGehee, Robert wrote:> I believe the paper on which those lecture notes were based can be found > here: > http://www.ci.tuwien.ac.at/Conferences/DSC-2003/Drafts/BatesDebRoy.pdf >Thank you. It looks as if it has some useful stuff in it. Ross
Ross Boylan <ross at biostat.ucsf.edu> writes:> Is there any good source of information on how S4 classes (and methods) > work from C? > > E.g., for reading > how to read a slot value > how to invoke a method > how to test if you have an s4 objectYou might look at Bioconductor's Ruuid package. It does some of this and is fairly small, so it is easy to see what is going on. http://bioconductor.org/packages/1.8/bioc/html/Ruuid.html + seth