Hello, I have some troubles when building S4-class packages. All my (S4-)code works well (without building a package). When building a package, in the R prompt after checking S3 generic/method consistency Following error occurs: Fehler: Kann R Kode in Packet 'AddNoise' nicht laden (~Error: Can not load R code from package 'AddNoise') (and there are some warnings after the error) So, I really need some reading material. Does anybody know some good documents about building S4-class packages beside "Writing R-Extensions", "S4 Classes in 15 pages, more or less" and "S4 Classes and Methods" from Fritz Leisch, especially documents which are detailed explains how to write .Rd files for S4-classes (with examples)? Probably, "Writing .Rd Files For S4 Classes, Generic Functions and Methods" from Gordon Smyth, 2003" were interessing, but the link http://bioinf.wehi.edu.au/limma/Rdocs.html is defenitly broken... Thanks for some links or additional documentents, Matthias
Building S4-classes, documents
2 messages · TEMPL Matthias, Seth Falcon
Hi Matthias,
On 17 Nov 2005, Matthias.Templ at statistik.gv.at wrote:
Hello, I have some troubles when building S4-class packages. All my (S4-)code works well (without building a package). When building a package, in the R prompt after checking S3 generic/method consistency Following error occurs: Fehler: Kann R Kode in Packet 'AddNoise' nicht laden (~Error: Can not load R code from package 'AddNoise') (and there are some warnings after the error)
I don't have documentation to recommend other than what you mentioned. However, a few things to look into: 1. If you have your R code in multiple files, you may need to use the DESCRIPTION file's Collate field to control the loading order. Basically, you want: Class defintions, generics, methods, other. 2. Put methods and any other packages you depend on in Depends. 3. Add SaveImage: yes. Also, make sure R CMD INSTALL yourPackage/ works before trying R CMD check yourPackage. + seth