From 631b93b1a428f77cd8eed4b18897adb32785a239 Mon Sep 17 00:00:00 2001 From: Jakob Krigovsky Date: Fri, 26 Mar 2021 14:12:18 +0100 Subject: [PATCH] Fix typos (#936) --- data-import.Rmd | 2 +- data-tidy.Rmd | 2 +- factors.Rmd | 2 +- workflow-projects.Rmd | 2 +- 4 files changed, 4 insertions(+), 4 deletions(-) diff --git a/data-import.Rmd b/data-import.Rmd index a7bfe0a..c96dddb 100644 --- a/data-import.Rmd +++ b/data-import.Rmd @@ -311,7 +311,7 @@ fruit <- c("apple", "banana") parse_factor(c("apple", "banana", "bananana"), levels = fruit) ``` -But if you have many problematic entries, it's often easier to leave as character vectors and then use the tools you'll learn about in [strings](#readr-strings) and [factors](#readr-factors) to clean them up. +But if you have many problematic entries, it's often easier to leave them as character vectors and then use the tools you'll learn about in [strings](#readr-strings) and [factors](#readr-factors) to clean them up. ### Dates, date-times, and times {#readr-datetimes} diff --git a/data-tidy.Rmd b/data-tidy.Rmd index e847d70..d9d214f 100644 --- a/data-tidy.Rmd +++ b/data-tidy.Rmd @@ -690,7 +690,7 @@ names(who) 2. The next letter gives the sex of TB patients. The dataset groups cases by males (`m`) and females (`f`). - 3. The remaining numbers gives the age group. + 3. The remaining numbers give the age group. The dataset groups cases into seven age groups: - `014` = 0 -- 14 years old diff --git a/factors.Rmd b/factors.Rmd index 113c526..10fc59b 100644 --- a/factors.Rmd +++ b/factors.Rmd @@ -23,7 +23,7 @@ library(tidyverse) If you want to learn more about factors, I recommend reading Amelia McNamara and Nicholas Horton's paper, [*Wrangling categorical data in R*](https://peerj.com/preprints/3163/). This paper lays out some of the history discussed in [*stringsAsFactors: An unauthorized biography*](http://simplystatistics.org/2015/07/24/stringsasfactors-an-unauthorized-biography/) and [*stringsAsFactors = \*](http://notstatschat.tumblr.com/post/124987394001/stringsasfactors-sigh), and compares the tidy approaches to categorical data outlined in this book with base R methods. -An early version of the paper help motivate and scope the forcats package; thanks Amelia & Nick! +An early version of the paper helped motivate and scope the forcats package; thanks Amelia & Nick! ## Creating factors diff --git a/workflow-projects.Rmd b/workflow-projects.Rmd index d784d44..8968221 100644 --- a/workflow-projects.Rmd +++ b/workflow-projects.Rmd @@ -130,7 +130,7 @@ Notice you get back to where you left off: it's the same working directory and c Because you followed my instructions above, you will, however, have a completely fresh environment, guaranteeing that you're starting with a clean slate. In your favorite OS-specific way, search your computer for `diamonds.pdf` and you will find the PDF (no surprise) but *also the script that created it* (`diamonds.R`). -This is huge win! +This is a huge win! One day you will want to remake a figure or just understand where it came from. If you rigorously save figures to files **with R code** and never with the mouse or the clipboard, you will be able to reproduce old work with ease!