Skip to content

Instantly share code, notes, and snippets.

@githoov
Created April 14, 2016 15:12
Show Gist options
  • Select an option

  • Save githoov/689ff7fee6e90d6f9cf760400a7ab085 to your computer and use it in GitHub Desktop.

Select an option

Save githoov/689ff7fee6e90d6f9cf760400a7ab085 to your computer and use it in GitHub Desktop.
# load data
durations <- read.csv(file = "~/Downloads/trial_durations.csv", header = TRUE)
names(durations) <- c("id", "month", "duration", "won")
# summary of time to close by closed won
summary.df <- ddply(durations, .(month, won), summarize, median_duration = median(duration))
# time to close
ggplot(durations, aes(x = month, y = duration, colour = won)) + geom_boxplot() + ggtitle("Trials: Time to Close") + xlab("Time") + ylab("Time to Close (Days)")
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment