MilesMcBain / tflow

An opinionated lightweight template for smooth targets flows.
Other
90 stars 9 forks source link

convenience function to add a package to packages.R? #24

Open bcjaeger opened 1 year ago

bcjaeger commented 1 year ago

The packages.R script is a wonderful idea.

When I'm writing a new function in a tflow project I often realize I need to add a package to packages.R. I move my focus over to the packages.R script to add the package, and then move my focus back to the function.

Would it make sense to add a function to tflow that could add library(whatever) to packages.R so that it isn't necessary to move from script to script? e.g., tflow::add_package(whatever) or tflow::use_package(whatever) if you don't mind the namespace overlap with usethis::use_package

MilesMcBain commented 1 year ago

Yeah I like the idea!