Skip to content

Instantly share code, notes, and snippets.

@klmr klmr/summarize.r Secret

Last active Aug 28, 2018
Embed
What would you like to do?
Summarise a simple table in < 5 lines of code #so
readr::read_csv(input_filename) %>%
dplyr::group_by(drug_name) %>%
dplyr::summarize(num_prescriber = n(), total_cost = sum(drug_cost)) %>%
readr::write_csv(output_filename)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
You can’t perform that action at this time.