thomasp85 / lime

Local Interpretable Model-Agnostic Explanations (R port of original Python package)
https://lime.data-imaginist.com/
Other
481 stars 109 forks source link

Error in combine_vars(data, params$plot_env, vars, drop = params$drop) : #193

Open christos82 opened 1 year ago

christos82 commented 1 year ago

Thank you for your help in advance. I am very new to programming but I can take critique. I'm sorry the code didn't copy and paste well and is a bit difficult to read. I'm trying for figure out the solution for the error message at the bottom that this code gives me.

MMR1 <-dhs_data(countryIds = c("BD","ET","JO","KE","MR","SD","TZ","UG"), indicatorIds = c("MM_MMRT_W_MRT", "MM_MMRT_W_PRT"))

countries <- MMR1 %>% filter(MMR1, CountryName == "Bangladesh", "Ethiopia", "Jordan", "Kenya", "Mauritania", "Sudan", "Tanzania", "Uganda")

library(ggplot2) MMR1 <-dhs_data(countryIds = c("BD","ET","JO","KE","MR","SD","TZ","UG"), indicatorIds = c("MM_MMRT_W_MRT", "MM_MMRT_W_PRT"))

countries <- MMR1 %>% filter(MMR1, CountryName == "Bangladesh", "Ethiopia", "Jordan", "Kenya", "Mauritania", "Sudan", "Tanzania", "Uganda")

ggplot(MMR1[MMR1$CountryName %in% countries,], aes(x=SurveyYear,y=Value,colour=CountryName)) + geom_point() + geom_smooth(method = "glm") + theme(axis.text.x = element_text(angle = 90, vjust = .5)) + ylab(MMR1$Indicator[1]) + facet_wrap(~CountryName,ncol = 8)

Error in combine_vars(data, params$plot_env, vars, drop = params$drop) :