Minor Typo Fixes in Section 8.2.1 (#1287)

Changed meal_type to meal_plan to maintain consistency with the variable name in the data/code.
This commit is contained in:
MatthiasLiew 2023-02-15 20:49:11 +08:00 committed by GitHub
parent 1a4d2481ea
commit 821973e944
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 2 additions and 2 deletions

View File

@ -104,7 +104,7 @@ students |> janitor::clean_names()
```
Another common task after reading in data is to consider variable types.
For example, `meal_type` is a categorical variable with a known set of possible values, which in R should be represented as a factor:
For example, `meal_plan` is a categorical variable with a known set of possible values, which in R should be represented as a factor:
```{r}
students |>
@ -114,7 +114,7 @@ students |>
)
```
Note that the values in the `meal_type` variable have stayed the same, but the type of variable denoted underneath the variable name has changed from character (`<chr>`) to factor (`<fct>`).
Note that the values in the `meal_plan` variable have stayed the same, but the type of variable denoted underneath the variable name has changed from character (`<chr>`) to factor (`<fct>`).
You'll learn more about factors in @sec-factors.
Before you analyze these data, you'll probably want to fix the `age` column.