Open luizaandrade opened 1 year ago
Thanks, we have worked on supporting haven_labelled variables before but maybe there has been a change somewhere in the pipeline. Do you have sample data that we can use to test?
Also could you tell us you version(s) of tidyverse packages? It looks like dplyr and purrr are both possibly involved.
I tried this:
iris$Sepal.Length.L <- labelled(iris$Sepal.Length)
class(iris$Sepal.Length.L)
[1] "haven_labelled" "vctrs_vctr" "double"
skim(iris)
and it worked fine. I also tried adding labels but it still worked. So I'm wondering if you can share your tidyverse versions (vctrs, dplyr, purrr specifically). Also can you try to determine if it is a specific labelled variable that is causing the error? (use select() to cut out different columns). If it is not all labelled variables but just specific ones, please share some more information about those variables.
Any updates?
Hi @elinw , sorry I missed this. And sorry I didn't share a repex when first opened the issue, or I would have realized that the problem was that although I'd loaded tidyverse
, haven
was not loaded. When haven is loaded, it works just fine. Thanks for your patience with this and for maintaining this great resource!
Okay it's funny that I just saw the same issue and your solution worked. But I do think that it is an issue, you shouldn't have to load haven to make it work.
@michaelquinn32 I think we need to move haven from suggested to required OR when we see haven_labelled numeric data we need to test for it and produce an error if it is not installed or skip it and warn. The issue is that numeric haven_labelled data needs the as.numeric.haven_labelled from haven.
I'm getting the following error message when using
skimr
2.1.5 on R 4.2.3:I have been able to use
skim
with the same data in the past without errors, but unfortunately I don't know exactly which version ofskimr
and R I was using when it last worked. My best guess is that it wasskimr
2.1.5 and R 4.2.1.