[ESS] Best Practice for building R packages
edd @end|ng |rom deb|@n@org
Thu Oct 8 13:57:20 CEST 2020
On 8 October 2020 at 13:39, Jeremie Juste via ESS-help wrote:
| Is anyone using ESS to build R packages? Could you share your workflow please?
We all may be a little different here.
ESS now wraps around devtools, but my practices predate devtools. So I still
build, test, install, ... on the command-line for which I use wrappers (from
my littler package, just updated yesterday) named
rcc.r # a nicer checker around rmdcheck
roxy.r # run roxygen, I use a 'cached' 6.1.1 version that does not force recompile...
install.r # plus various install* variants for BioC, or GitHub, or binaries...
kitten.r # using a wrapper around package.skeleton()
render.r # run rmarkdown::render()
all of which are soft-linked into ~/bin or /usr/local/bin so that
TAB-complete gets to them too.
I use ESS to insert roxygen chunks though. And I regularly render Markdown
from ESS (well, Emacs) via C-x c and (once) replacing 'make -k' with
It may actually make sense for _all of use_ to maybe pool for two or three
hours and a webinar over Zoom for 'favourite ESS' tricks. I keep forgetting
how there is -- just yesterday I once again forgot C-c C-e w and looked for
the cheat sheet pdf and there are a bootload of options I never used ...
| I read the doc of ESS about using roxygen to document the functions.
| By the way it looks like the link to  roxygen is broken and that
| roxygen2 has taken its place.
Yes but that happened maybe a decade ago. Most docs you find online should be
| I initially thought that I could use the workflow of the  Roxygen
| : <http://roxygen.org>
| : https://web.archive.org/web/20170324200536/http://roxygen.org/roxygen.pdf
| For convenience I reproduce it here
| #' A package to check Roxygen's sanity
| #' @name helloRoxygen-package
| #' @docType package
| $ package.skeleton('helloRoxygen',
| $ roxygen2::roxygenize("helloRoxygen")
| But I get the following warning message :
| Warning: The existing 'helloRoxygen-package.Rd' file was not generated by roxygen2, and will not be overwritten.
Delete or renamed, then try again. It should be written and roxygenize should
then be quiet.
| And the file helloRoxygen-package.Rd is not updated.
| I'll appreciate any lead on this.
| Best Regards,
| Jeremie Juste
| ESS-help using r-project.org mailing list
https://dirk.eddelbuettel.com | @eddelbuettel | edd using debian.org
More information about the ESS-help