Skip to content

Commit 9411ecd

Browse files
intro bug hunt r
1 parent a66fd2f commit 9411ecd

File tree

2 files changed

+5
-5
lines changed

2 files changed

+5
-5
lines changed

_bookdown.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,4 +4,4 @@ language:
44
ui:
55
edit: "Edit"
66
chapter_name: "Chapter "
7-
rmd_files: ["index.Rmd", "source/foreword.Rmd", "source/preface.Rmd", "source/acknowledgments.Rmd", "source/authors.Rmd", "source/intro.Rmd", "source/reading.Rmd", "source/wrangling.Rmd", "source/viz.Rmd", "source/classification1.Rmd", "source/classification2.Rmd", "source/regression1.Rmd", "source/regression2.Rmd", "source/clustering.Rmd", "source/inference.Rmd", "source/jupyter.Rmd", "source/version-control.Rmd", "source/setup.Rmd", "source/references.Rmd"]
7+
rmd_files: ["index.Rmd", "source/intro.Rmd", "source/references.Rmd"]

source/intro.Rmd

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -237,7 +237,7 @@ library(tidyverse)
237237
```
238238

239239
> **Note:** You may have noticed that we got some extra
240-
> output from R saying `Attaching packages` and `Conflicts` below our code
240+
> output from R regarding attached packages and conflicts below our code
241241
> line. These are examples of *messages* in R, which give the user more
242242
> information that might be handy to know. The `Attaching packages` message is
243243
> natural when loading `tidyverse`, since `tidyverse` actually automatically
@@ -452,7 +452,7 @@ selected_lang <- select(aboriginal_lang, language, mother_tongue)
452452
selected_lang
453453
```
454454

455-
## Using `arrange` to order and `slice` to select rows by index number
455+
## Using `arrange` to order and `slice` to select rows by index number {#arrangesliceintro}
456456

457457
We have used `filter` and `select` to obtain a table with only the Aboriginal
458458
languages in the data set and their associated counts. However, we want to know
@@ -500,7 +500,7 @@ counts... But perhaps, seeing these numbers, we became curious about the
500500
*percentage* of the population of Canada associated with each count. It is
501501
common to come up with new data analysis questions in the process of answering
502502
a first one&mdash;so fear not and explore! To answer this small
503-
question-along-the-way, we need to divide each count in the `mother_tongue`
503+
question along the way, we need to divide each count in the `mother_tongue`
504504
column by the total Canadian population according to the 2016
505505
census&mdash;i.e., 35,151,728&mdash;and multiply it by 100. We can perform
506506
this computation using the `mutate` function. We pass the `ten_lang`
@@ -523,7 +523,7 @@ as a mother tongue by between 0.008% and 0.18% of the Canadian population.
523523

524524
## Exploring data with visualizations
525525

526-
We have now answered our initial question by generating the `ten_lang` table!
526+
The `ten_lang` table we generated in Section \@ref(arrangesliceintro) answers our initial data analysis question.
527527
Are we done? Well, not quite; tables are almost never the best way to present
528528
the result of your analysis to your audience. Even the `ten_lang` table with
529529
only two columns presents some difficulty: for example, you have to scrutinize

0 commit comments

Comments
 (0)