[Rd] Wishlist: Writing R Extensions suggestions RE: [R] vague errors on R CMD check for very minimal S4-style package (PR#8944)

Steven.Roels at mpi.com Steven.Roels at mpi.com
Wed Jun 7 14:11:41 CEST 2006

Ah yes. There they are right on page 4 of "Writing R Extensions".

The "LazyLoad: yes" was sufficient to avoid the check errors, but I'll
add the "Depends: methods" as well.

For the manual-impaired like me, it _may_ be worth reiterating these two
requirements in section 1.6.6 "Name spaces with formal classes and
methods" - right where the .onLoad requirement is mentioned.  

Also, at may be worth mentioning in "Writing R Extensions" that the
stats4 package can serve as a template/example for S4-style packages (at
least a quick search for "stats4" didn't find anything there or in the

Thanks to you both.


>This is an S4-using package but missing a dependence on 'methods'.
>To run R CMD check the package has to load under minimal conditions,
>> library(foo)
>should work.  'methods' is quite expensive to load, and so is only used
>checking if explicitly requested.

>> Try adding LazyLoad: yes to DESCRIPTION (or SaveImage: yes).
>Depends: methods
>Package stats4 is provided in part as an example of a small S4-using
>package for people to copy.

Steve Roels, Ph.D.                       
Senior Scientist I
Computational Biology               Phone: (617) 761-6820
Millennium Pharmaceuticals, Inc.    FAX:   (617) 577-3555
640 Memorial Drive                  Email: roels at mpi.com
Cambridge, MA 02139-4815

This e-mail, including any attachments, is a confidential business communication, and may contain information that is confidential, proprietary and/or privileged.  This e-mail is intended only for the individual(s) to whom it is addressed, and may not be saved, copied, printed, disclosed or used by anyone else.  If you are not the(an) intended recipient, please immediately delete this e-mail from your computer system and notify the sender.  Thank you.

More information about the R-devel mailing list