klmr / box

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

How to share {box} modules through GitHub like R packages #242

Open mrismailt opened 2 years ago

mrismailt commented 2 years ago

Is there a {box} alternative to something like devtools::install_github so that we can create, share, and reuse R packages hosted in GitHub repos just like we do with R packages?

klmr commented 2 years ago

There isn’t yet. There’s a long-term plan to provide this (see #11) but before this can happen, proper versioning needs to be implemented (#28).

But unlike packages, ‘box’ modules don’t need to be installed to be usable. So while the convenience of installation directly inside R is missing, an easy way to install modules from GitHub is to just clone the project into the local module search path. If you’ve set box.path to /some/path, then running the following in a shell does that:

git clone git@github.com:klmr/fun.git /some/path/klmr/fun
GitHunter0 commented 2 years ago

This is gonna be a great achievement, will be way cleaner and more agile method to work with reusable versioned code than conventional R packages.