Properly Loading Packages #313
Replies: 1 comment 1 reply
-
If you do not set the Environment variables, packages with conflicts to manage, and |
Beta Was this translation helpful? Give feedback.
-
If you do not set the Environment variables, packages with conflicts to manage, and |
Beta Was this translation helpful? Give feedback.
-
Hello,
I am a drake user coming over to targets now that it is on CRAN and am loving it!
One question I had is regarding properly loading packages into the workflow. I know in the documentation you had mentioned using the packages argument in the tar_option_set function in the _targets.R file. However, with drake I use a requirements.R script to load packages, resolve package conflicts, set environment variables, and set the project path using the i_am function from the here package. I then would source this file in the _drake.R file before using walk from purrr to source all functions in my R directory, and finally define the drake plan. I learned this approach from @MilesMcBain here and I believe you featured it in the drake documentation as well. I can provide further details regarding what these files look like, should that be required.
Is there a better way to do this in targets using some of the arguments to the tar_option_set function (since I'm including more than just packages)?
All the best,
TC
Beta Was this translation helpful? Give feedback.
All reactions