Your practices for organizing code shared across project types

Hi all,

As I am starting to develop more complicated and varied r projects, I am increasingly needing to have a strategy to reuse code across project types (and projects) such as:

  1. interactive one-off projects that use common code like standard dplyr datasets for exploration and rapid protoyping
  2. shiny apps
  3. markdown style apps

I am interested in how people approach this situation when a package is not quite the right approach. Specifically, how do you organize your code files shared amongst a group of projects (for example a client with multiple project types) to maximize reuse, yet still allow for manageable sourcing etc. Again, I looking for the situation where a package is not quite the right approach.

I tend to have quite modular files so often have quite a few files for each project.

Thanks!

Rob

1 Like

Hi,

Have you heard od the modules package? It seems to be for those code pieces that are not destined for a package, but more than just a plain source file.

Here's a vignette
https://cran.r-project.org/web/packages/modules/vignettes/modulesInR.html

This is the package's PDF

Hope this helps,
PJ

This topic was automatically closed 21 days after the last reply. New replies are no longer allowed.