-
Notifications
You must be signed in to change notification settings - Fork 417
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
unnest_wider() fails when list columns have additional classes and missing values #1327
Comments
Were you using some package that created a |
Developer note: This is due to this section of Lines 163 to 166 in 5da45d0
We try to construct a replacement element for all of the Ideally we'd be able to construct a replacement using the classed list, approximately like It might be that this is the "best" we can do, and that developer who created |
I just created "fake" as a dummy class for the reprex (it shouldn't have any methods). The actual usage where I discovered this was in converting the |
Can you please also post a full reprex with rentrez to ensure that we fix that specific problem too? I appreciate the minimal reprex, that is definitely the right thing to do here, but it'll also be nice to know that we fixed this for rentrez too, which might be more complex |
library(rentrez)
library(tidyr)
#> Warning: package 'tidyr' was built under R version 4.1.2
library(tibble)
pmid <- "30407550"
x <- rentrez::entrez_summary(
db = "pubmed",
pmid,
always_return_list = TRUE
)
df <- tibble::tibble(id = pmid, record = x)
tidyr::unnest_wider(df, record)
#> Error: Can't convert <list> to <esummary>. Created on 2022-02-25 by the reprex package (v2.0.1) |
PROBLEM: tidyr::unnest_wider() fails with a type conversion error after upgrading from tidyr v1.1.4 to v1.2.0. See tidyverse/tidyr#1327. FIX: Strip unneeded esummary class before formatting.
The newest version of tidyr introduced at least one breaking change by relying on the strict typing provided by the vctrs package. See tidyverse/tidyr#1327
I recently upgraded from
1.1.4
to1.2.0
and ran into an error withunnest_wider()
. It now fails with a type conversion error when two occurrences overlap:NULL
orlist()
).Created on 2022-02-25 by the reprex package (v2.0.1)
rlang::last_error()
rlang::last_trace()
Session info
The text was updated successfully, but these errors were encountered: