Skip to content
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

as_loop() doesn't work correctly on pmap #10

Open
TimTeaFan opened this issue Oct 5, 2022 · 0 comments
Open

as_loop() doesn't work correctly on pmap #10

TimTeaFan opened this issue Oct 5, 2022 · 0 comments
Assignees
Labels
bug Something isn't working

Comments

@TimTeaFan
Copy link
Owner

library(loopurrr)
#> Loading required package: purrr

x <- list(1, 1, 1)
y <- list(10, 20, 30)
z <- list(100, 200, 300)
a <- list(x, y, z)

# expected
pmap(a, sum)
#> [[1]]
#> [1] 111
#> 
#> [[2]]
#> [1] 221
#> 
#> [[3]]
#> [1] 331

# doesn't work
pmap(a, sum) %>% as_loop()
#> Error in !is_clipr: invalid argument type

# works!
pmap(list(x, y, z), sum) %>% as_loop()
#> Error in !is_clipr: invalid argument type

Created on 2022-10-05 by the reprex package (v0.3.0)

@TimTeaFan TimTeaFan self-assigned this Oct 5, 2022
@TimTeaFan TimTeaFan added the bug Something isn't working label Oct 5, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

1 participant