Skip to content

Commit 2f32135

Browse files
fix order of warning/df in reading
1 parent 6fb43f8 commit 2f32135

File tree

1 file changed

+9
-16
lines changed

1 file changed

+9
-16
lines changed

source/reading.Rmd

Lines changed: 9 additions & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -209,21 +209,19 @@ library(tidyverse)
209209
```
210210

211211
Next we use `read_csv` to load the data into R, and in that call we specify the
212-
relative path to the file.
212+
relative path to the file. Note that it is normal and expected that \index{warning} a message is
213+
printed out after using the `read_csv` and related functions. This message lets you know the data types
214+
of each of the columns that R inferred while reading the data into R. In the
215+
future when we use this and related functions to load data in this book, we will
216+
silence these messages to help with the readability of the book.
217+
213218

214219
```{r load-data, message = TRUE}
215220
canlang_data <- read_csv("data/can_lang.csv")
216221
```
217222

218223
\newpage
219224

220-
> **Note:** It is also normal and expected that \index{warning} a message is
221-
> printed out after using
222-
> the `read_csv` and related functions. This message lets you know the data types
223-
> of each of the columns that R inferred while reading the data into R. In the
224-
> future when we use this and related functions to load data in this book, we will
225-
> silence these messages to help with the readability of the book.
226-
227225
Finally, to view the first 10 rows of the data frame,
228226
we must call it:
229227

@@ -260,17 +258,12 @@ Non-Official & Non-Aboriginal languages,Amharic,22465,12785,200,33670
260258
With this extra information being present at the top of the file, using
261259
`read_csv` as we did previously does not allow us to correctly load the data
262260
into R. In the case of this file we end up only reading in one column of the
263-
data set:
261+
data set. In contrast to the normal and expected messages above, this time R
262+
prints out a warning for us indicating that there might be a problem with how
263+
our data is being read in. \index{warning}
264264

265265
```{r}
266266
canlang_data <- read_csv("data/can_lang_meta-data.csv")
267-
```
268-
269-
> **Note:** In contrast to the normal and expected messages above, this time R
270-
> printed out a warning for us indicating that there might be a problem with how
271-
> our data is being read in. \index{warning}
272-
273-
```{r}
274267
canlang_data
275268
```
276269

0 commit comments

Comments
 (0)