[R] Writing R packages in an easier way?
Yihui Xie
xie at yihui.name
Sat Feb 12 01:27:35 CET 2011
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
--
Yihui Xie <xieyihui at gmail.com>
Phone: 515-294-2465 Web: http://yihui.name
Department of Statistics, Iowa State University
2215 Snedecor Hall, Ames, IA
On Fri, Feb 11, 2011 at 5:30 PM, Michael Friendly <friendly at yorku.ca> wrote:
> On 2/11/2011 2:52 AM, Dr. Michael Wolf wrote:
>>
>> Dear R colleagues,
>>
> ...
>>
>> From the point of the costs e. g. I had to learn writing help files in
>> a TeX-like language. But I'm the typical Word user. My last TeX writings
>> were done in the 1990s! If I'm changing only a letter in a source file
>> (r-file or help file) I've to build a new package. Seeing the results in
>> my eyes this is a very expansive way. It's easier to me to write those
>> files in HTML and to change the HTML source code. I don't need help
>> files in Rd format.
>>
>
> You can make things a whole lot easier by using prompt() to write the
> skeletons of the .Rd files. Then you have a ready-made template for
> your function or data and only need to fill in the details. Once you
> try this, you'll find it's not really any different than HTML markup.
>
> ?prompt
>
More information about the R-help
mailing list