but when I want to run these cod i get these errors!!!
df_bmi<-df %>% filter(!is.na(BMI_group))
Error in df %>% filter(!is.na(BMI_group)) : could not find function "%>%"
PieDonut(df,aes(Gender,BMI_group),selected=1,labelposition=1,title="Distribution of BMI by age")
Error in aes(Gender, BMI_group) : could not find function "aes"
ggplot(df, aes(Gender, age)) +
facet_wrap(~TownshipName)
Error in ggplot(df, aes(Gender, age)) : could not find function "ggplot"
PieDonut(df,aes(Residence,BMI_group),selected=1,labelposition=1,title="Distribution of BMI by Urbanity")
Error in aes(Residence, BMI_group) : could not find function "aes"
Run the code below in a fresh session. If it throws the same error, something is wrong with the location in which the libraries were stored, which can happen if you have packages installed both as root and user.
This means you are set up correctly and shouldn't see the errors when both dplyr and ggplot are loaded with library(). If you have trouble please post a reprex.