Skip to content

Instantly share code, notes, and snippets.

@tmuth
Created February 11, 2015 15:59
Show Gist options
  • Save tmuth/e036bdd65f730c8110aa to your computer and use it in GitHub Desktop.
Save tmuth/e036bdd65f730c8110aa to your computer and use it in GitHub Desktop.
dplyr group_by needs ungroup() to get expected behavior
DF_SQL_BY_SNAPID.top_sql.sd.elap <- DF_SQL_BY_SNAPID %>%
group_by(PARSING_SCHEMA_NAME,SQL_ID,COMMAND_NAME) %>%
summarise(
elapsed.avg=mean(ELAP_S),
elapsed.stddev=sd(ELAP_S)
) %>%
ungroup() %>%
arrange(desc(elapsed.stddev)) %>%
head(30)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment