filter verb rstudio

your filter code mentioned 'Food sales' of which the closest example in the dput version of cbecs_2 was 'Food sales ' i.e. with a space in the end; and this doesnt match.
My assumption is that you intend them to match; therefore I recommend you trim the whitespace of Scenario.
You might do so with an earlier mutate() but heres a version where you do it inline

p_activity <- cbecs_2 %>% filter(trimws(Scenario) %in% c("Education", "Food sales", "Food service", "Health care", "Inpatient", "Outpatient", "Lodging", "Mercantile", "Retail (other than mall)", "Enclosed and strip malls", "Office", "Public assembly", "Public order and safety", "Religious worship", "Service", "Warehouse and storage", "Vacant"))

This topic was automatically closed 21 days after the last reply. New replies are no longer allowed.

If you have a query related to it or one of the replies, start a new topic and refer back with a link.