Replies: 2 comments 2 replies
-
A second test shows that all the names are gone (even in the nested list)! So how to deal with this? Is there a workaround? targets::tar_dir({
targets::tar_script({
library(targets)
library(tarchetypes)
values <- tibble::tribble(
~x, ~y,
"X", list(a = list(b = 1))
)
tar_option_set(package = "tidyverse")
targets <- tar_map(
values = values,
names = x,
tar_target(
test,
y
)
)
list(targets)
})
targets::tar_make()
targets::tar_read(test_X)
})
#> * start target test_X
#> * built target test_X
#> * end pipeline: 0.8 seconds
#> [[1]]
#> [[1]][[1]]
#> [1] 1 Created on 2022-03-31 by the reprex package (v2.0.1) |
Beta Was this translation helpful? Give feedback.
0 replies
-
|
Beta Was this translation helpful? Give feedback.
2 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
-
The following codes generated a target from
tar_map()
to extract names from itsy
values, but in vain. It only returnsNULL
. Can the named list keep its names?Created on 2022-03-31 by the reprex package (v2.0.1)
Ideally, the above target
test_X
will return"a"
instead.Beta Was this translation helpful? Give feedback.
All reactions