Skip to content
Back to formatted view

Raw Message

Message-ID: <CAPPM_gR3J8fOUJvNoK71PX3WAYAwcmsqfY6Vr4758SWxGnyCrQ@mail.gmail.com>
Date: 2011-09-09T16:49:39Z
From: Joshua Ulrich
Subject: Please explain your workflow from R code -> package -> R code -> package
In-Reply-To: <CAErODj_mu8dOujVCJh14d-UbDw9qrq-9CC3MeeCSQ6d28-rJDg@mail.gmail.com>

On Fri, Sep 9, 2011 at 11:38 AM, Paul Johnson <pauljohn32 at gmail.com> wrote:
> Hi,
>
> I'm asking another one of those questions that would be obvious if I
> could watch your work while you do it.
>
> I'm having trouble understanding the workflow of code and package maintenance.
>
> Stage 1. ?Make some R functions in a folder. ?This is in a Subversion repo
>
> R/trunk/myproject
>
> Stage 2. Make a package:
>
> After the package.skeleton, and R check, I have a new folder with the
> project in it,
>
> R/trunk/myproject/mypackage
> ?DESCRIPTION
> ?man
> ?R
>
> I to into the man folder and manually edit the Rd files. I don't
> change anything in the R folder because I think it is OK so far.
>
> And eventually I end up with a tarball mypackage_1.0.tar.gz.
>
> Stage 3. How to make the round trip? I add more R code, and
> re-generate a package.
>
> package.skeleton obliterates the help files I've already edited.
>
See ?dump and ?prompt.

> So keeping the R code in sync with the documentation appears to be a hassle.
>
> In other languages, I've seen to write the documentation inside the
> code files and then post-process to make the documentation. ?Is there
> a similar thing for R, to unify the R code development and
> documentation/package-making process?
>
Yes.  See the roxygen / roxygen2 and devtools packages.

> pj
>
> --
> Paul E. Johnson
> Professor, Political Science
> 1541 Lilac Lane, Room 504
> University of Kansas
>
> ______________________________________________
> R-devel at r-project.org mailing list
> https://stat.ethz.ch/mailman/listinfo/r-devel
>

Best,
--
Joshua Ulrich  |  FOSS Trading: www.fosstrading.com