Skip to content

Instantly share code, notes, and snippets.

@njahn82
Created November 13, 2018 16:45
Show Gist options
  • Select an option

  • Save njahn82/d80447df053dcead68b726772206c1a3 to your computer and use it in GitHub Desktop.

Select an option

Save njahn82/d80447df053dcead68b726772206c1a3 to your computer and use it in GitHub Desktop.
R4DS Join Excercise 13.4 Question 4
weather %>%
gather(6:14, key = "condition", value = "value") %>%
inner_join(flights) %>%
mutate(delayed = ifelse(dep_delay < 30, "on time", "delayed")) %>%
ggplot(aes(condition, value, color = delayed)) +
geom_boxplot() +
facet_wrap(~condition, scale = "free_y") +
scale_y_log10()
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment