So, I am having a problem with creating a bar graph that I can plot both of my variables of LifeEB17 which is life expectancy and Basic sanitation on the x-axis and present values on the y-axis. They are both percentage numbers. Please help!
data = HealthNutri
view (HealthNutri)
#Packages
library(ggplot2)
library(tidyr)
library(dplyr)
#Comparison of life expectancy and percentage of people using basic sanitation
HealthNutri <- HealthNutri[c(54, 83, 112, 130, 132, 137, 139, 140, 142, 148, 158, 160, 167, 191, 215, 223, 231, 232),]
HealthNutri <- data.frame(CountryName = c("Australia", "Channel Islands", "France", "Hong Kong SAR", "Iceland", "Ireland", "Israel", "Italy", "Japan", "North Korea", "Liechtenstein", "Luxembourg", "Malta", "Norway", "Singapore", "Spain", "Sweden","Switzerland"), LifeEB17=c(82.5, 83, 82.58, 84.68, 82.66, 82.16, 82.55, 82.94, 84.10, 82.63, 83.75, 82.10, 82.35, 82.61, 83.10, 83.28, 82.41, 83.55), BasicSanitation17 = c(100, 98.5, 98.65, 96.44, 98.78, 91.25, 100, 98.77, 99.89, 100, 99.95, 97.60, 99.96, 98.05, 100, 99.90, 99.29, 99.89))`