Skip to content
Discussion options

You must be logged in to vote

The crew worker does run .Rprofile (from checking the worker log messages, see crew_options_local()). However, targets then loads the packages in tar_option_get("packages") in the order listed. The default value is (.packages()), which lists plyr after dplyr. But you can explicitly list packages in a suitable order using tar_option_set(). For example, this pipeline fails:

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 %>% 
      r…

Replies: 1 comment 1 reply

Comment options

You must be logged in to vote
1 reply
@icrichmond
Comment options

Answer selected by icrichmond
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Help
Labels
None yet
2 participants