Skip to content

[help] Advice on highly heterogeneous workflows #1400

Answered by wlandau
connor-duffin asked this question in Help
Discussion options

You must be logged in to vote

Successive tar_make() calls are totally fine. If you prefer a single one, then you might consider restructuring the dependency graph to force certain targets to run after one another. For example, instead of:

library(targets)
list(
  tar_target(name = expensive, command = f()),
  tar_target(name = cheap, command = g())
)

you could consider something like:

library(targets)
list(
  tar_target(name = expensive, command = f()),
  tar_target(
    name = cheap,
    command = {
      expensive
      g()
    }
  )
)

or a different variation of this that doesn't load expensive inside cheap:

library(targets)
list(
  tar_target(name = expensive, command = f()),
  tar_target(
    name = sentinel,
    

Replies: 1 comment 1 reply

Comment options

You must be logged in to vote
1 reply
@connor-duffin
Comment options

Answer selected by connor-duffin
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