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
Recently ran into a disturbing #ChatGPT result: I asked it to translate a #python function written by Mathieu Daëron (https://github.com/mdaeron/D47crunch) to #R, using the #tidyverse and a #tibble. I had done this manually for my #rpackage https://github.com/isoverse/clumpedr/ and wanted to see how they would compare.
It returned my code literally, including TODO notes, comments, and #roxygen skeleton. But it did not say where it got the code from, even when pressed. My R package is on #github under #GPL 3. Thoughts?
#gpl #github #roxygen #rpackage #tibble #tidyverse #r #python #chatgpt