[R] Writing R packages in an easier way?

Spencer Graves spencer.graves at structuremonitoring.com
Sat Feb 12 04:43:06 CET 2011


That's a procedure for those who want to write Fortran in R, who love 
debugging spaghetti and refuse to be bothered with silly things like 
test suites and any firm notion of functionality.  Spencer


On 2/11/2011 7:06 PM, David Scott wrote:
> On 12/02/2011 1:27 p.m., Yihui Xie wrote:
>> I guess Emacs + ESS + roxygen might be the easiest way to write an R
>> package. Writing or modifying Rd files/templates, in my eyes, is
>> really time-consuming and the Rd files are difficult to maintain
>> (unless you really have a good memory). I became reluctant to maintain
>> my R packages simply because I felt painful to maintain the
>> documentation. After I learned a bit about roxygen and ESS a few
>> months ago, several of my packages came back to life again (e.g. this
>> picture is a piece of evidence:
>> https://github.com/yihui/animation/graphs/impact). The feeling was
>> probably like when Dr Harrell switched from SAS to S (see
>> library(fortunes); fortune('I quit using SAS')).
>>
>> Anyway, prompt() and package.skeleton() are very helpful in the short 
>> run.
>>
>> Regards,
>> Yihui
>> -- 
>
> There is also the slackers way of producing R packages without writing 
> any documentation.
>
> You create a file PackageName-internal.Rd in which you then put the 
> name of the package and all the functions as aliases:
>
> \name{PackageName-internal}
> \alias{function1}
> \alias{function2}
> .
> .
> .
>
> \title{Internal PackageName objects}
> \description{Internal PackageName objects.}
> \details{These are not to be called by the user.}
> \keyword{internal}
>
>
> I only mention this possibility for the sake of intellectual 
> completeness of the discussion of this topic.
>
> It of course totally subverts the whole philosophy of package 
> construction in R, so I wouldn't dream of using it myself.
>
> David Scott
>



More information about the R-help mailing list