klmr / box

Write reusable, composable and modular R code
https://klmr.me/box/
MIT License
833 stars 47 forks source link

box without modules #279

Open ggrothendieck opened 2 years ago

ggrothendieck commented 2 years ago

Please describe your feature request

Although the purpose of box is to define modules as an alternative to packages two other usages are possible:

  1. add a help system to a script file without using modules. Many times I deal with R users who do not want to learn additional infrastructure whether it be packages, modules or whatever. They want to continue to either paste scripts into R or use source(...). All they really need is to be given a script with roxygen2 markup and a help command that will get them formatted help on that script. What would also be useful would be something analogous to help("function") and help(package = "myPackage") but for a single script. Ideally there would only be one help command to learn and no other commands would be needed since the whole purpose is to avoid learning and to avoid infrastructure when dealing with occasional type of R users.

  2. as a stepping stone to developing a package. Again this does not require modules but just requires some support for roxygen2 markup to get help as in (1). Also, what would be useful for this one would be a command that converts the script to a package.

This could either be part of box or made into a separate package.

DanChaltiel commented 5 months ago

For your 2nd point, you might be interested in using https://thinkr-open.github.io/fusen/