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

list_c() needs to deal with names #997

Closed
hadley opened this issue Nov 5, 2022 · 1 comment · Fixed by #998
Closed

list_c() needs to deal with names #997

hadley opened this issue Nov 5, 2022 · 1 comment · Fixed by #998

Comments

@hadley
Copy link
Member

hadley commented Nov 5, 2022

purrr:::list_c(list(a = 1:2, b = 1:3))
#> Error in `list_unchop()`:
#> ! Can't merge the outer name `a` with a vector of length > 1.
#> Please supply a `.name_spec` specification.

#> Backtrace:
#>     ▆
#>  1. ├─purrr:::list_c(list(a = 1:2, b = 1:3))
#>  2. │ └─vctrs::list_unchop(x, ptype = ptype, error_call = current_env())
#>  3. └─rlang::abort(message = message)

Created on 2022-11-05 with reprex v2.0.2

hadley added a commit that referenced this issue Nov 9, 2022
hadley added a commit that referenced this issue Nov 10, 2022
@olivroy
Copy link

olivroy commented May 17, 2024

Cf from #1064 (comment), could list_c() gain name_spec instead, or a better solution exists.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants