Reprex code - tryout - error in ggplot

hi all, I was working on this code in training reprex and it didnt work. Thanks in advance for your help

Best,

Kevin Wassing

install and load packages

pacman::p_load(rio, here, janitor, reprex, datapasta, tidyverse)

import data

surv_raw ← data.frame(
stringsAsFactors = FALSE,
adm3_name_res = c(NA,“Mountain Rural”,
“Mountain Rural”,“East II”,
“West III”),
sex = c(“m”, “f”, “f”, “f”, “f”)
)# clean the surveillance data
surv_clean ← surv_raw %>%
clean_names()

make a horizontal bar plot of cases per district, filled by sex

ggplot(
data = Surv_clean,
mapping = aes(y = adm3_name_res, fill = sex))+
geom_bar()

Hello,

R is case sensitive, you defined your clean data as surv_clean but you call Surv_clean in ggplot. Replace this with surv_clean and things should work.

All the best,

Tim