The {document} #rstats 📦 creates roxygen2-style documentation for functions that aren't (yet) part of an R package.
In the screenshot below, top left shows a test.R file with a function called test_function , including roxygen definitions. After running
d <- document("test.R")
I can use
?test_function
to read the help file as if it were part of a package.
By Andreas Dominik Cullmann
https://cran.r-project.org/web/packages/document/vignettes/Introduction_to_document.html