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

bind_cols() gives cryptic error message for unnamed inputs #3402

Closed
jennybc opened this issue Mar 9, 2018 · 3 comments
Closed

bind_cols() gives cryptic error message for unnamed inputs #3402

jennybc opened this issue Mar 9, 2018 · 3 comments
Assignees
Labels

Comments

@jennybc
Copy link
Member

@jennybc jennybc commented Mar 9, 2018

dplyr::bind_cols(list(1, 2))
#> Error in cbind_all(x): Not compatible with STRSXP: [type=NULL].
dplyr::bind_cols(list(one = 1, two = 2))
#> # A tibble: 1 x 2
#>     one   two
#>   <dbl> <dbl>
#> 1    1.    2.

Created on 2018-03-09 by the reprex package (v0.2.0).

Possibly relevant context: I came across this via purrr::map_dfc(). So the fact you need names and how/where to inject them is less obvious than the above reprex indicates. Hence a better error message would really pay off.

@jennybc
Copy link
Member Author

@jennybc jennybc commented Mar 9, 2018

Pre-existing report from the purrr::map_dfc() world: tidyverse/purrr#395

@krlmlr
Copy link
Member

@krlmlr krlmlr commented Mar 12, 2018

Thanks, confirmed.

@romainfrancois romainfrancois self-assigned this Mar 13, 2018
romainfrancois pushed a commit that referenced this issue Mar 14, 2018
bind_cols handles unnamed list. closes #3402
krlmlr added a commit that referenced this issue Mar 16, 2018
* Show clear error message for bad arguments to `funs()` (#3368).

* Improved documentation for `funs()` (#3094).

* Compute variable names for joins in R (#3430).

* Hybrid evaluation simplifies `dplyr::foo` to `foo` (#3309).

* `bind_cols()` handles unnamed list (#3402).
@lock
Copy link

@lock lock bot commented Sep 10, 2018

This old issue has been automatically locked. If you believe you have found a related problem, please file a new issue (with reprex) and link to this issue. https://reprex.tidyverse.org/

@lock lock bot locked and limited conversation to collaborators Sep 10, 2018
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
Projects
None yet
Linked pull requests

Successfully merging a pull request may close this issue.

None yet
3 participants