<jupyter_start><jupyter_text>Dot placeholder<jupyter_code>us_murder_rate <- murders %>% summarize(rate = sum(total) / sum(population) * 10^5) %>% .$rate
us_murder_rate<jupyter_output><empty_output><jupyter_text>Group By:It is usefull to first split data into groups and then compute summaries for each group. The output object is a "group data frame" as oposed to a data frame and dplyr functions will behave differently. See below:<jupyter_code>heights %>% 
    group_by(sex) %>%
    summarize(average = mean(height), std_deviation = sd(height))
murders %>%
    group_by(region) %>%
    summarize(median_rate = median(murder_rate))<jupyter_output><empty_output><jupyter_text>dplyr.arrange() | desc() | top_n()<jupyter_code>murders %>%
    arrange(murder_rate) %>%
    head(3)

murders %>%
    arrange(desc(murder_rate)) %>%
    head(3)
murders %>%
    arrange(region, murder_rate) %>%
    head(3)<jupyter_output><empty_output>
{'fraction_non_alphanumeric': 0.133764832793959, 'fraction_numerical': 0.006472491909385114, 'mean_word_length': 5.823529411764706, 'pattern_counts': {'":': 0, '<': 14, '<?xml version=': 0, '>': 25, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'chain_length': '3', 'dir': 'jupyter-structured-clean-dedup', 'id': '227570', 'license': 'MIT', 'n_tokens_mistral': 350, 'n_tokens_neox': 328, 'n_words': 67, 'path': 'PH125.2x - dplyr.ipynb', 'repo_name': 'angelaraya/r-notebooks', 'size': '927'}