jamesmartherus/anesr

Filter Error with Time Series 2020 Data

Closed this issue · 1 comments

Hi there,

Ran into the following issue when filtering the timeseries_2020 data. I had no issues using the cumulative time series file with what were essentially the same commands.

After loading up dplyr, devtools, and anesr, I ran the following commands:

data(timeseries_2020) datadems2020 <- timeseries_2020 %>% filter(V201228 == 1)

This resulted in the following:

See Screenshot

That being said, anything that involves playing with the data seems to result in that same error:

Screenshot

This could very well be user error, I am quite rusty when it comes to R, but reaching out in case it is a data or package issue.

Thank you.

Hi Alex, this is because most variables are given the haven_labelled class. This lets us store metadata like the text of the survey question. You can fix the error by loading the haven package.