I've recently been pointed towards Roxygen to solve my documentation woes/laziness. But then there's this shiny Roxygen2 which, in my understanding, is somewhat its own thing. Hadley's package tools require the use of Roxygen2, but there doesn't seem to be much by way of a walk-through anywhere.
Given that I'm starting from scratch in the learning process:
Is there a use case, for a new user, that favors Roxygen instead of Roxygen2, or is Roxygen2 better in all ways?
If so what resources are out there for learning it (preferably those which don't rely on prior knowledge of Roxygen)?
Is Roxygen2 backwards-compatible with Roxygen (such that time invested in learning and writing Roxygen would carry over)?
roxygen2 allows you to write specially formatted R comments that generate R documentation files ( man/*. Rd ) and a NAMESPACE file. roxygen2 is used by over 8,000 CRAN packages. Install the latest version of roxygen2 with: install.packages("roxygen2")
R objects are documented in files written in “R documentation” (Rd) format, a simple markup language much of which closely resembles (La)TeX, which can be processed into a variety of formats, including LaTeX, HTML and plain text.
There's no reason to prefer roxygen to roxygen2 if starting from scratch. We're working on an introductory article for r news.
I switched my build scripts to call roxygen2 instead of roxygen, and everything worked as before, except that now I get a nice, auto-generated NAMESPACE file.
So learning roxygen means that you are learning the basics of roxygen2. I'm sure I'm not using all the new features, but for the basics roxygen2 works just like roxygen.
I'd also add that install_github()
in the devtools package (also on github) is absolutely great. For packages that are not CRAN-worthy, github is a great way to go.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With