Hi everyone! I’m doing the Applied Epi R course and I’m having trouble with the filter()
function from dplyr.
Here is my reprex:
library(dplyr)
data <- data.frame(
age = c(20, 30, 40),
district = c("Bolo", "Kulo", "Bolo")
)
data %>%
filter(district = "Bolo") # This gives an error
I expected this to return rows where district is Bolo, but I get an error.
Any help would be appreciated — thank you!