Fix cross-ref/heading issues

This commit is contained in:
Hadley Wickham 2022-02-24 15:07:23 -06:00
parent b4ca9f3fc6
commit 6bb4c0d6c4
5 changed files with 7 additions and 7 deletions

View File

@ -71,7 +71,7 @@ There are two main advantages:
If you have a consistent data structure, it's easier to learn the tools that work with it because they have an underlying uniformity.
2. There's a specific advantage to placing variables in columns because it allows R's vectorised nature to shine.
As you learned in Sections \@ref(mutate-funs) and \@ref(summarise-funs), most built-in R functions work with vectors of values.
As you learned in Sections \@ref(mutate) and \@ref(summarise), most built-in R functions work with vectors of values.
That makes transforming tidy data feel particularly natural.
dplyr, ggplot2, and all the other packages in the tidyverse are designed to work with tidy data.

View File

@ -208,7 +208,7 @@ flights |>
There are four important verbs that affect the columns without changing the rows: `mutate()`, `select()`, `rename()`, and `relocate()`.
`mutate()` creates new columns that are functions of the existing columns; `select()`, `rename()`, and `relocate()` change which columns are present, their names, or their positions.
### `mutate()`
### `mutate()` {#mutate}
The job of `mutate()` is to add new columns that are calculated from the existing columns.
In the transform chapters, you'll learn a large set of functions that you can use to manipulate different types of variables.
@ -396,7 +396,7 @@ flights |>
`group_by()` doesn't change the data but, if you look closely at the output, you'll notice that it's now "grouped by" month.
This means subsequent operations will now work "by month".
### `summarise()`
### `summarise()` {#summarise}
The most important grouped operation is a summary.
It collapses each group to a single row[^data-transform-3].

View File

@ -76,7 +76,7 @@ As well as `&` and `|`, R also has `&&` and `||`.
Don't use them in dplyr functions!
These are called short-circuiting operators and you'll learn when you should use them in Section \@ref(conditional-execution) on conditional execution.
### Missing values
### Missing values {#logical-missing}
`filter()` only selects rows where the logical expression is `TRUE`; it doesn't select rows where it's missing or `FALSE`.
If you want to find rows containing missing values, you'll need to convert missingness into a logical vector using `is.na()`.

View File

@ -30,5 +30,5 @@ In this part of the book you will learn some useful tools that have an immediate
Modelling is an important part of the exploratory process, but you don't have the skills to effectively learn or apply it yet and details of modeling fall outside the scope of this book.
Nestled among these five chapters that teach you the tools for doing data science are three chapters that focus on your R workflow.
In Chapters \@ref(workflow-basics), \@ref(workflow-scripts), and \@ref(workflow-projects), you'll learn good workflow practices for writing and organising your R code.
In Chapters \@ref(workflow-basics), \@ref(workflow-pipes), \@ref(workflow-style), and \@ref(workflow-scripts-projects), you'll learn good workflow practices for writing and organising your R code.
These will set you up for success in the long run, as they'll give you the tools to stay organised when you tackle real projects.

View File

@ -1,4 +1,4 @@
# Workflow: scripts and projects
# Workflow: scripts and projects {#workflow-scripts-projects}
```{r, results = "asis", echo = FALSE}
status("restructuring")
@ -74,7 +74,7 @@ RStudio will also let you know about potential problems:
knitr::include_graphics("screenshots/rstudio-diagnostic-warn.png")
```
# Workflow: projects
## Workflow: projects
One day you will need to quit R, go do something else and return to your analysis the next day.
One day you will be working on multiple analyses simultaneously that all use R and you want to keep them separate.