You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I have a package that stores a number of survey datasets with recoded data in them. The script below installs the package and tries to construct a tabular dataset from the various datasets. It was working for me up until recently. However, now it returns an error
Error in bind_rows(): ! Can't combine ..1$male<haven_labelled> and..2$male<haven_labelled>. ✖ Some attributes are incompatible. ℹ The author of the class should implement vctrs methods.
This is a stripped down version of the code and it reproduces the error.
It was working for me earlier.
library(tidyverse)
remotes::install_github("sjkiss/cesdata2")
#> Using GitHub PAT from the git credential store.#> Skipping install of 'cesdata2' from a github remote, the SHA1 (4bf65d7e) has not changed since last install.#> Use `force = TRUE` to force installation
library(cesdata2)
# List data framesces.list<-list(ces84, ces88, ces93, ces97, ces00, ces15phone, ces15web, ces19phone, ces19web, ces21)
#Provide names for list
names(ces.list)<-c( 1984, 1988, 1993, 1997, 2000, "2015 Phone", "2015 Web","2019 Phone", "2019 Web", 2021)
#Common variables to be selectedcommon_vars<-c('male',
'sector',
'occupation', 'vote')
ces.list %>%
map(., select, any_of(common_vars))%>%
#bind_rows smushes all the data frames together, and creates a variable called election
bind_rows()->ces#> Error in `bind_rows()`:#> ! Can't combine `..1$male` <haven_labelled> and `..2$male` <haven_labelled>.#> ✖ Some attributes are incompatible.#> ℹ The author of the class should implement vctrs methods.#> ℹ See <https://vctrs.r-lib.org/reference/faq-error-incompatible-attributes.html>.
I have a package that stores a number of survey datasets with recoded data in them. The script below installs the package and tries to construct a tabular dataset from the various datasets. It was working for me up until recently. However, now it returns an error
Error in
bind_rows(): ! Can't combine
..1$male<haven_labelled> and
..2$male<haven_labelled>. ✖ Some attributes are incompatible. ℹ The author of the class should implement vctrs methods.
This is a stripped down version of the code and it reproduces the error.
It was working for me earlier.
Created on 2024-06-19 with reprex v2.1.0
The text was updated successfully, but these errors were encountered: