Search code examples
rdocumentationroxygen2

Using Roxygen2 for my utility functions


In my analysis projects (not a package), I usually have utility functions that I source() in different analysis scripts.

I've been using the Roxygen2 documentation convention (e.g. starting the documentation with #', which is well supported in RStudio.

Can I make these documentation available via help(my_utility_function)? Everything I read so far uses Roxygen2 and devtools::document() in the context of a package. Indeed, when I tried to use devtools::document(), it complains about not being able to find the package root.


Solution

  • You will need to make it into a package.