0

One of the many advantages of packaging your functions in a library is the option to add help text to your functions. This can be useful for several reasons, but sometimes it's just not worth it to create a custom package.

What are some options to add help text to custom functions in R, outside of creating a custom package?

This question from six years ago touches on some options. However, most of the answers are cumbersome, and I was hoping that some alternative methods were available.

mhovd
  • 3,724
  • 2
  • 21
  • 47
  • Does this answer your question? [Possible to create Rd help files for objects not in a package?](https://stackoverflow.com/questions/18923405/possible-to-create-rd-help-files-for-objects-not-in-a-package) – NelsonGon Aug 08 '20 at 15:36
  • Considering the question is over six years old, I was hoping there were some more feasible approaches, @NelsonGon – mhovd Aug 08 '20 at 16:34
  • Afraid not. This [question](https://stackoverflow.com/questions/38999440/is-roxygen2-only-for-documenting-r-packages-or-also-for-r-projects) has some fairly recent comments by Konrad who also comments [here](https://stackoverflow.com/a/27948963/10323798) but that's just about it. Your best bet may be filing an issue at the `roxygen` repo. – NelsonGon Aug 08 '20 at 16:42
  • Is the requirement to be accessible from R's `help(...)`, or just provide documentation *somewhere*? For instance, `roxygen` documentation in a function definition can be readable (especially with `@md`) and fill your need. – r2evans Aug 08 '20 at 16:45
  • The requirement is mostly to provide context for function variables. I don't much care for providing other text or examples, but more so to get the help text for variables. – mhovd Aug 08 '20 at 17:05

0 Answers0