-
Notifications
You must be signed in to change notification settings - Fork 129
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
list output of dynamic target work #1103
Comments
This is a consequence of the design of the internals. Downstream targets of dynamic targets should also be dynamic except when you use library(drake)
library(tidyverse)
plan <- drake_plan(
foo = rep(list(iris), 4),
bar = target(
foo[[1]],
dynamic = map(foo)
),
bah = bind_rows(readd(bar)) %>% as_tibble()
)
make(plan)
#> target foo
#> dynamic bar
#> subtarget bar_45aef32a
#> subtarget bar_45aef32a_2
#> subtarget bar_45aef32a_3
#> subtarget bar_45aef32a_4
#> aggregate bar
#> target bah
readd(bah)
#> # A tibble: 600 x 5
#> Sepal.Length Sepal.Width Petal.Length Petal.Width Species
#> <dbl> <dbl> <dbl> <dbl> <fct>
#> 1 5.1 3.5 1.4 0.2 setosa
#> 2 4.9 3 1.4 0.2 setosa
#> 3 4.7 3.2 1.3 0.2 setosa
#> 4 4.6 3.1 1.5 0.2 setosa
#> 5 5 3.6 1.4 0.2 setosa
#> 6 5.4 3.9 1.7 0.4 setosa
#> 7 4.6 3.4 1.4 0.3 setosa
#> 8 5 3.4 1.5 0.2 setosa
#> 9 4.4 2.9 1.4 0.2 setosa
#> 10 4.9 3.1 1.5 0.1 setosa
#> # … with 590 more rows Created on 2019-12-09 by the reprex package (v0.3.0) library(drake)
library(tidyverse)
plan <- drake_plan(
foo = rep(list(iris), 4),
bar = target(
foo[[1]],
dynamic = map(foo)
),
bah = bind_rows(readd(bar)) %>% as_tibble()
)
make(plan)
#> target foo
#> dynamic bar
#> subtarget bar_45aef32a
#> subtarget bar_45aef32a_2
#> subtarget bar_45aef32a_3
#> subtarget bar_45aef32a_4
#> aggregate bar
#> target bah
readd(bah)
#> # A tibble: 600 x 5
#> Sepal.Length Sepal.Width Petal.Length Petal.Width Species
#> <dbl> <dbl> <dbl> <dbl> <fct>
#> 1 5.1 3.5 1.4 0.2 setosa
#> 2 4.9 3 1.4 0.2 setosa
#> 3 4.7 3.2 1.3 0.2 setosa
#> 4 4.6 3.1 1.5 0.2 setosa
#> 5 5 3.6 1.4 0.2 setosa
#> 6 5.4 3.9 1.7 0.4 setosa
#> 7 4.6 3.4 1.4 0.3 setosa
#> 8 5 3.4 1.5 0.2 setosa
#> 9 4.4 2.9 1.4 0.2 setosa
#> 10 4.9 3.1 1.5 0.1 setosa
#> # … with 590 more rows Created on 2019-12-09 by the reprex package (v0.3.0) |
Prework
drake
's code of conduct.remotes::install_github("ropensci/drake")
) and mention the SHA-1 hash of the Git commit you install.Description
When I try to run
bind_rows
on a dynamic target withoutreadd
it fails.Reproducible example
Created on 2019-12-10 by the reprex package (v0.3.0)
Session info
Expected result
The
bah
target should be like the final df above.The text was updated successfully, but these errors were encountered: