Search code examples
rroxygenroxygen2

Is it possible/advisable to skip roxygen in favor of roxygen2?


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:

  1. Is there a use case, for a new user, that favors Roxygen instead of Roxygen2, or is Roxygen2 better in all ways?

  2. If so what resources are out there for learning it (preferably those which don't rely on prior knowledge of Roxygen)?

  3. Is Roxygen2 backwards-compatible with Roxygen (such that time invested in learning and writing Roxygen would carry over)?


Solution

  • 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.