FredHutch / VISCtemplates

Tools for writing reproducible reports at VISC
Other
6 stars 2 forks source link

Avoid forcing 3 objects into the user's .GlobalEnv #186

Closed slager closed 1 month ago

slager commented 2 months ago

This is a bit nit-picky, but the other day when I had interrupted devtools::test() I noticed that these 3 objects had been written to my global environment in Rstudio, which is not what we want to be doing per best practices.

This PR reins in the scoping of these 3 objects to the environment in which they actually get used.

See also:

kelliemac commented 1 month ago

@slager could you add some comments, especially to the skeleton.Rmd files, on why this is the desired practice? you explain it in this PR, but it would be good to have a note in the template files so that everyone understands when they create a new report/project that this is the best practice.

slager commented 1 month ago

@kelliemac There were multiple instances of it in the skeleton files, so I had the idea of just putting it in the centralized documentation so that it wouldn't need to be repeated. Let me know if you think that works!

kelliemac commented 1 month ago

looks great to me!