Is it possible/advisable to skip roxygen in favor of roxygen2? [closed]
Asked Answered
I

2

11

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)?

Iguana answered 6/8, 2011 at 22:21 Comment(4)
I don't see a useful question here. Maybe you should consider the chat room if you need an informal gab about it.Mayberry
Maybe rephrase the question as: Is there a use case, for a new user, that favors roxygen instead of roxygen2, or is roxygen2 better in all ways?Ornithomancy
roxygen2 is to roxygen as ggplot2 is to ggplot. Instead of updating roxygen, which many people use, when the authors drastically updated/improved roxygen they released it as a new package. How you write your source files is essentially the same.Rodriques
@Kevin: Yours, together with Hadley's answer and Gavin's comment, are rather what I was looking for. Can you make your answer comment an actual answer?Iguana
B
7

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.

Biz answered 7/8, 2011 at 15:31 Comment(0)
A
13

There's no reason to prefer roxygen to roxygen2 if starting from scratch. We're working on an introductory article for r news.

Arvillaarvin answered 7/8, 2011 at 2:57 Comment(0)
B
7

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.

Biz answered 7/8, 2011 at 15:31 Comment(0)

© 2022 - 2024 — McMap. All rights reserved.