filepath <- “/Users/adeelmalik/Downloads/medical_data_cleaned.csv”
medical_data <- read.csv(filepath, header = TRUE)
medical_data <- medical_data
filter(State %in% c(“WV”, “KY”, “TN”, “OH”))
it gives: Error in State %in% c(“WV”, “KY”, “TN”, “OH”) : object ‘State’ not found.
My medical_data dataframe shows the columns in R and the header is True.
Dplyr and other packages have been loaded. I made sure the columns were showing in R and I made sure to use the correct file name and capitalization. How can I make it so it ‘finds’ the state column?
user2287419 is a new contributor to this site. Take care in asking for clarification, commenting, and answering.
Check out our Code of Conduct.