You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Happens in the portion of script right before the Key Points (shown below). In this chunk of script, " # here we use the paste0() function to allow cont to change in the title" is text that also should be removed
"
lifeexp_plot <- function(country_name){
function plotting life expectancy against over time by country
country_name = name of country, string
every time we would have written the continent, we now write cont
p <- gap %>%
filter(country == country_name) %>%
ggplot(aes(x = year, y = lifeExp)) +
geom_point() +
# here we use the paste0() function to allow cont to change in the title
ggtitle(paste0("Life expectancy over time in ", country_name)) +
ylab("Life expectancy (years)") +
xlab("Year") +
theme_bw()
return the plot so it prints out when we call the function
" # every time we would have written the continent, we now write 'cont'"
should be removed - not used
The text was updated successfully, but these errors were encountered: