Skip to content

Instantly share code, notes, and snippets.

@githoov
Last active April 13, 2016 18:30
Show Gist options
  • Save githoov/34350c67b9423b3871a2fc60528d9d0e to your computer and use it in GitHub Desktop.
Save githoov/34350c67b9423b3871a2fc60528d9d0e to your computer and use it in GitHub Desktop.
# load data
df <- read.csv(file = "~/Downloads/cadence.csv", header = TRUE)
names(df) <- c("id", "month", "in_trial", "topic", "number_of_chats", "median_time_to_reply", "iqr")
# create a summary table for inspection
summary.df <- ddply(na.omit(subset(df, number_of_chats > 5)), .(month), summarize, cadence = median(median_time_to_reply), spread = median(iqr))
# plot median of medians over time
ggplot(na.omit(subset(df, number_of_chats > 5)), aes(x = month, y = median_time_to_reply)) + stat_summary(fun.data = mean_cl_normal)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment