# Summarizing rows

module 3
week 5
across
count
group_by
slice
summarise
Aggregate row values
Author

Jeff Stevens

Published

February 22, 2023

We’ll use the {dplyr} `summarise()` functions to apply summary functions to data rows (e.g., `mean()`, `min()`). This is most useful when paired with `group_by()` to calculate summary values for each level in a group.

## Learning objectives

• Summarize column values
• Start using summary functions
• Apply functions across columns
• Summarize separately for group levels
• Generate subsets of rows per group

## Pre-meeting

To prepare for this class meeting, please do the following:

## Class meeting

• Counting rows per column level
• Summarizing column values across rows
• Summarizing multiple columns
• Grouping rows
• Summarizing groups of data
• Summarizing multiple groups
• Slicing rows per group
• Reviewing dplyr verbs
• Slides and Code
{"ft_lang_label":"__label__en","ft_lang_prob":0.61099625,"math_prob":0.46434075,"size":708,"snap":"2023-40-2023-50","text_gpt3_token_len":181,"char_repetition_ratio":0.140625,"word_repetition_ratio":0.0,"special_character_ratio":0.22033899,"punctuation_ratio":0.075,"nsfw_num_words":0,"has_unicode_error":false,"math_prob_llama3":0.98414266,"pos_list":[0],"im_url_duplicate_count":[null],"WARC_HEADER":"{\"WARC-Type\":\"response\",\"WARC-Date\":\"2023-12-02T08:27:53Z\",\"WARC-Record-ID\":\"<urn:uuid:2c59a31b-4d48-4dcc-9fd0-6e4583977cfb>\",\"Content-Length\":\"20159\",\"Content-Type\":\"application/http; msgtype=response\",\"WARC-Warcinfo-ID\":\"<urn:uuid:d2c93318-3e2a-4ce9-ad6f-e3cb2d0bf0b1>\",\"WARC-Concurrent-To\":\"<urn:uuid:b23e27bf-de0a-4341-9b37-2bf255d10bdf>\",\"WARC-IP-Address\":\"185.199.109.153\",\"WARC-Target-URI\":\"https://jeffreyrstevens.github.io/dpavir2023/posts/14_summarizing/index.html\",\"WARC-Payload-Digest\":\"sha1:GARU6FUSQGUWL6XKT7CRYS6Z2NW7P77Y\",\"WARC-Block-Digest\":\"sha1:PT7QLZCNPIP5DYSBTJWE2DSWVN56SRX7\",\"WARC-Identified-Payload-Type\":\"application/xhtml+xml\",\"warc_filename\":\"/cc_download/warc_2023/CC-MAIN-2023-50/CC-MAIN-2023-50_segments_1700679100381.14_warc_CC-MAIN-20231202073445-20231202103445-00665.warc.gz\"}"}