Re: [R] R package building

From: Jay Emerson <>
Date: Sat, 17 May 2008 10:05:01 -0400

I agree with others that the packaging system is generally easy to use, and between the "Writing R Extensions" documentation and other scattered sources (including these lists) there shouldn't be many obstacles. Using "package.skeleton()" is a great way to get started: I'd recommend just having one data object and one new function in the session for starters. You can build up from there.

I've only ran into time-consuming walls on more advanced, obscure issues. For example: the "Suggests:" field in DESCRIPTION generated quite some debate back in 2005, but until I found that thread in the email lists I didn't understand the issue. For completeness, I'll round out this discussion, hoping I'm correct. In essence, I think the choice of the word "Suggests:" was intended for the package user, not for the developer. The user isn't required to have a suggested package in order to load and use the desired package. But the developer is required (in the R CMD check) to have the suggested package in order to avoid warnings or fails. This does, actually, make sense, because we assume a developer would want/need to check features that involve the suggested package. In a few isolated cases (I think I had one of them), this caused a problem, where a desired suggested package isn't distributed by CRAN on all platforms, so I would risk getting into trouble with R CMD check on the platform without the suggested package. But this is pretty obscure, and the issue was obviously well-debated in the past. The addition of a line or two about this in "Writing R Extensions" would be friendly (the current content is correct and minimal sufficient I believe). Maybe I should draft this and submit it to the group.

Secondly, I would advice a newbie to the packaging system to avoid S4 at first. Ultimately, I think it's pretty cool. But, for example, documentation on proper documentation (to handle the man pages correctly) has puzzled me, and even though I can create a package with S4 that passes R CMD check cleanly, I'm not convinced I've got it quite right. If someone has recently created more documentation or a 'white pages' on this, please do spread the word.

Thanks to all who have -- and continue -- to work on the system!


>Subject: [R] R package building
>In a few days I'll give a talk on R package development and my
>personal experience, at the 3rd Free / Libre / Open Source Software
>(FLOSS) Conference which will take place on May 27th & 28th 2008, in
>the National Technical University of Athens, in Greece.
>I would appreciate if you could share
>your thoughts with me; What are today's obstacles on R package
>building, according to your
>opinion and personal experience.
>Angelos I. Markos
>Scientific Associate, Dpt of Exact Sciences, TEI of Thessaloniki, GR
>"I'm not an outlier; I just haven't found my distribution yet"

John W. Emerson (Jay)
Assistant Professor of Statistics
Director of Graduate Studies
Department of Statistics
Yale University

______________________________________________ mailing list
PLEASE do read the posting guide
and provide commented, minimal, self-contained, reproducible code.
Received on Sat 17 May 2008 - 14:09:42 GMT

Archive maintained by Robert King, hosted by the discipline of statistics at the University of Newcastle, Australia.
Archive generated by hypermail 2.2.0, at Sat 17 May 2008 - 18:30:38 GMT.

Mailing list information is available at Please read the posting guide before posting to the list.

list of date sections of archive