-
Notifications
You must be signed in to change notification settings - Fork 41
Open
Description
Question raised in connection to this example:
What if data frame includes variables that should not be passed to .f()?
df_oops <- tibble(
n = 1:3,
min = c(0, 10, 100),
max = c(1, 100, 1000),
oops = c("please", "ignore", "me")
)
df_oops
#> # A tibble: 3 x 4
#> n min max oops
#> <int> <dbl> <dbl> <chr>
#> 1 1 0. 1. please
#> 2 2 10. 100. ignore
#> 3 3 100. 1000. meThis will not work!
set.seed(123)
pmap(df_oops, runif)
#> Error in .f(n = .l[[c(1L, i)]], min = .l[[c(2L, i)]], max = .l[[c(3L, : unused argument (oops = .l[[c(4, i)]])Use that to motivate some development and debugging strategies.
Reactions are currently unavailable
Metadata
Metadata
Assignees
Labels
No labels