We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
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
Suppose I have a list with the following structure:
ls <- list(NULL, list("foo"=data_frame(bar=c(1, 2, 3))), list("foo"=data_frame(bar=c(4,5,6))))
using map_df to extract as a dataframe works well:
map_df
map_df(ls, ~.x[["foo"]])
## # A tibble: 6 × 1 ## bar ## <dbl> ## 1 1 ## 2 2 ## 3 3 ## 4 4 ## 5 5 ## 6 6
But if I pass in the name as an atomic character vector, I get an error:
map_df(ls, "foo")
## Error: `x` must be a vector (not a NULL)
The text was updated successfully, but these errors were encountered:
This is fixed in the dev version. (And in the future, can you please use the reprex package to create reprexes)
Sorry, something went wrong.
(Not sure whether it's the dev version of purrr or dplyr, but it definitely works for me)
Installed the dev version of purrr and it works for me too now. Thanks!
No branches or pull requests
Suppose I have a list with the following structure:
using
map_df
to extract as a dataframe works well:But if I pass in the name as an atomic character vector, I get an error:
## Error: `x` must be a vector (not a NULL)
The text was updated successfully, but these errors were encountered: