[help] Rprofile conflicted rules not recognized when using crew #1515
-
Help
DescriptionHello, I have a large After adding a I have attempted to produce a minimal reproducible example below: My _targets.R file looks like this:
My packages are loaded in
My .Rprofile looks like this:
The error message associated with this example is here: ![]() When I remove the controller argument from I have tried sourcing the packages in the .Rprofile instead of _targets.R, I have tried sourcing the packages in Also, last but not least -- thank you so much for creating the wonderful world of Session Info : R version 4.5.0 (2025-04-11 ucrt) Matrix products: default locale: time zone: America/Toronto attached base packages: other attached packages: loaded via a namespace (and not attached): |
Beta Was this translation helpful? Give feedback.
Replies: 1 comment 1 reply
-
The library(crew)
library(targets)
tar_option_set(
controller = crew_controller_local(
options_local = crew_options_local(log_directory = "~/Desktop")
),
packages = c("dplyr", "plyr")
)
list(
tar_target(
data,
tibble(x = seq(1:5), y = seq(5:1))
),
tar_target(
data_renamed,
data %>%
rename(x_rename = x)
)
) whereas this one succeeds: library(crew)
library(targets)
tar_option_set(
controller = crew_controller_local(
options_local = crew_options_local(log_directory = "~/Desktop")
),
packages = c("plyr", "dplyr")
)
list(
tar_target(
data,
tibble(x = seq(1:5), y = seq(5:1))
),
tar_target(
data_renamed,
data %>%
rename(x_rename = x)
)
) |
Beta Was this translation helpful? Give feedback.
The
crew
worker does run.Rprofile
(from checking the worker log messages, seecrew_options_local()
). However,targets
then loads the packages intar_option_get("packages")
in the order listed. The default value is(.packages())
, which listsplyr
afterdplyr
. But you can explicitly list packages in a suitable order usingtar_option_set()
. For example, this pipeline fails: