Skip to content

Commit

Permalink
Fix #165
Browse files Browse the repository at this point in the history
  • Loading branch information
wlandau-lilly committed Jan 3, 2024
1 parent 7e87f65 commit c716d40
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 1 deletion.
1 change: 1 addition & 0 deletions NEWS.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@

* Use `tar_seed_create()` and `tar_seed_set()` from `targets`.
* Document limitations of literate programming target factories like `tar_render()` (#158).
* Make `tar_rep2()` compatible with `tar_map()` (#165).

# tarchetypes 0.7.10

Expand Down
4 changes: 3 additions & 1 deletion R/tar_rep2_raw.R
Original file line number Diff line number Diff line change
Expand Up @@ -106,7 +106,6 @@ tar_rep2_raw <- function(

tar_rep2_command <- function(command, targets, iteration, rep_workers) {
batches <- lapply(targets, as.symbol)
names(batches) <- targets
substitute(
tarchetypes::tar_rep2_run(
command = command,
Expand Down Expand Up @@ -134,6 +133,9 @@ tar_rep2_command <- function(command, targets, iteration, rep_workers) {
#' @param iteration Iteration method: `"list"`, `"vector"`, or `"group"`.
tar_rep2_run <- function(command, batches, iteration, rep_workers) {
command <- substitute(command)
expr_batches <- substitute(batches)
names <- map_chr(as.list(expr_batches), targets::tar_deparse_safe)[-1L]
names(batches) <- names
assert_batches(batches)
reps <- batch_count_reps(batches[[1]])
pedigree <- targets::tar_definition()$pedigree
Expand Down

0 comments on commit c716d40

Please sign in to comment.