From a793af0aac92a2839888111af031dd0ad6df6928 Mon Sep 17 00:00:00 2001 From: Hadley Wickham Date: Thu, 9 Mar 2023 08:04:22 -0600 Subject: [PATCH] Typo Fixes #1350 --- data-transform.qmd | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/data-transform.qmd b/data-transform.qmd index 3319ec4..20febd4 100644 --- a/data-transform.qmd +++ b/data-transform.qmd @@ -213,7 +213,7 @@ flights |> distinct(origin, dest, .keep_all = TRUE) ``` -It's not a coincidence that all of these distinct flights are on January 1, `distinct()` will find the find the first occurrence of a unique row in the dataset and discard the rest. +It's not a coincidence that all of these distinct flights are on January 1: `distinct()` will find the first occurrence of a unique row in the dataset and discard the rest. If you want to find the number of occurrences instead, you're better off swapping `distinct()` for `count()`, and with the `sort = TRUE` argument you can arrange them in descending order of number of occurrences. You'll learn more about count in @sec-counts.