[R] dumpClass
What do people do in R to get something comparable to the functionality of dumpClass described by Chambers (1998) Programming with Data (Springer)? Thanks, spencer graves __ [EMAIL PROTECTED] mailing list https://www.stat.math.ethz.ch/mailman/listinfo/r-help PLEASE do read the posting guide! http://www.R-project.org/posting-guide.html
Re: [R] dumpClass, hasSlot in R?
Marc Schwartz MSchwartz at MedAnalytics.com writes: : : On Wed, 2004-07-21 at 15:53, hadley wickham wrote: : There are a few notes about difference between the R implementation : and the book at http://developer.r-project.org/methodsPackage.html : : I found the hardest thing to get to grips in R was method calling - : using multiple dispatch (totally different to what I'm used to from : Java, Python etc.). I found this tutorial : (http://www.gwydiondylan.org/gdref/tutorial.html, the sections on : generic functions and multiple-dispatch) very useful. However, it is : for another programming language, and although the method and class : creation process feels very similar to R, the syntax is quite : different. There is definitely scope for a similarly structured : introduction to S4 classes in R. : : Hadley : : I have not done any S4 coding yet, but two references that may be of : interest are: : : Converting Packages to S4 : by Doug Bates : R News Vol 3, No. 1, June 2003 : http://cran.r-project.org/doc/Rnews/Rnews_2003-1.pdf : : and : : S4 Classes and Methods : by Fritz Leisch : useR! 2004 Keynote Lecture : Slides available at: : http://www.ci.tuwien.ac.at/Conferences/useR-2004/Keynotes/Leisch.pdf : : HTH, : : Marc Schwartz Also: S4 Classes in 15 pages, more or less http://www.bioconductor.org/develPage/guidelines/programming/S4Objects.pdf __ [EMAIL PROTECTED] mailing list https://www.stat.math.ethz.ch/mailman/listinfo/r-help PLEASE do read the posting guide! http://www.R-project.org/posting-guide.html
Re: [R] dumpClass, hasSlot in R?
Thanks to Hadley Wickham, Mar Schwartz, and Gabor Grothendieck. I'm skimming all 5 documents cited, and I will study them more later. Thanks again. Best Wishes, Spencer Graves Gabor Grothendieck wrote: Marc Schwartz MSchwartz at MedAnalytics.com writes: : : On Wed, 2004-07-21 at 15:53, hadley wickham wrote: : There are a few notes about difference between the R implementation : and the book at http://developer.r-project.org/methodsPackage.html : : I found the hardest thing to get to grips in R was method calling - : using multiple dispatch (totally different to what I'm used to from : Java, Python etc.). I found this tutorial : (http://www.gwydiondylan.org/gdref/tutorial.html, the sections on : generic functions and multiple-dispatch) very useful. However, it is : for another programming language, and although the method and class : creation process feels very similar to R, the syntax is quite : different. There is definitely scope for a similarly structured : introduction to S4 classes in R. : : Hadley : : I have not done any S4 coding yet, but two references that may be of : interest are: : : Converting Packages to S4 : by Doug Bates : R News Vol 3, No. 1, June 2003 : http://cran.r-project.org/doc/Rnews/Rnews_2003-1.pdf : : and : : S4 Classes and Methods : by Fritz Leisch : useR! 2004 Keynote Lecture : Slides available at: : http://www.ci.tuwien.ac.at/Conferences/useR-2004/Keynotes/Leisch.pdf : : HTH, : : Marc Schwartz Also: S4 Classes in 15 pages, more or less http://www.bioconductor.org/develPage/guidelines/programming/S4Objects.pdf __ [EMAIL PROTECTED] mailing list https://www.stat.math.ethz.ch/mailman/listinfo/r-help PLEASE do read the posting guide! http://www.R-project.org/posting-guide.html __ [EMAIL PROTECTED] mailing list https://www.stat.math.ethz.ch/mailman/listinfo/r-help PLEASE do read the posting guide! http://www.R-project.org/posting-guide.html
[R] dumpClass, hasSlot in R?
Venables and Ripley (2000) R Programming (Springer, sec. 5.1) and Chambers (1998) Programming with Data (Springer) describe functions such as dumpClass and hasSlot that I can not find in R 1.9.1 for Windows nor in the R site search. What do people use for similar functionality? Also, what resources have people found useful for learning about S4 classes, other than these 2 references? Thanks, Spencer Graves __ [EMAIL PROTECTED] mailing list https://www.stat.math.ethz.ch/mailman/listinfo/r-help PLEASE do read the posting guide! http://www.R-project.org/posting-guide.html
Re: [R] dumpClass, hasSlot in R?
On Wed, 2004-07-21 at 15:53, hadley wickham wrote: There are a few notes about difference between the R implementation and the book at http://developer.r-project.org/methodsPackage.html I found the hardest thing to get to grips in R was method calling - using multiple dispatch (totally different to what I'm used to from Java, Python etc.). I found this tutorial (http://www.gwydiondylan.org/gdref/tutorial.html, the sections on generic functions and multiple-dispatch) very useful. However, it is for another programming language, and although the method and class creation process feels very similar to R, the syntax is quite different. There is definitely scope for a similarly structured introduction to S4 classes in R. Hadley I have not done any S4 coding yet, but two references that may be of interest are: Converting Packages to S4 by Doug Bates R News Vol 3, No. 1, June 2003 http://cran.r-project.org/doc/Rnews/Rnews_2003-1.pdf and S4 Classes and Methods by Fritz Leisch useR! 2004 Keynote Lecture Slides available at: http://www.ci.tuwien.ac.at/Conferences/useR-2004/Keynotes/Leisch.pdf HTH, Marc Schwartz __ [EMAIL PROTECTED] mailing list https://www.stat.math.ethz.ch/mailman/listinfo/r-help PLEASE do read the posting guide! http://www.R-project.org/posting-guide.html