Overwriting the pillar method from haven is necessary because of a bug in haven, which will be fixed when https://github.com/tidyverse/haven/pull/425 is incorporated into a CRAN release by the tidyverse team.
Until then, the warning that comes with R 3.6:
library(ipumsr)
#> Registered S3 methods overwritten by 'ipumsr':
#> method from
#> format.pillar_shaft_haven_labelled_chr haven
#> format.pillar_shaft_haven_labelled_num haven
#> pillar_shaft.haven_labelled haven
is preferable to not being able to print the data under some circumstances.
After, you can merge this pull request and release to CRAN.
The bug in haven is:
library(haven)
library(tibble)
x <- haven::labelled(1:2, c("label" = 1, "label" = 2))
tibble(x = x)
#> Error in `levels<-`(`*tmp*`, value = as.character(levels)): factor level [2] is duplicated
Overwriting the pillar method from haven is necessary because of a bug in haven, which will be fixed when https://github.com/tidyverse/haven/pull/425 is incorporated into a CRAN release by the tidyverse team.
Until then, the warning that comes with R 3.6:
is preferable to not being able to print the data under some circumstances.
After, you can merge this pull request and release to CRAN.
The bug in haven is:
Created on 2019-05-13 by the reprex package (v0.2.1)