@@ -209,21 +209,19 @@ library(tidyverse)
209
209
```
210
210
211
211
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
+
213
218
214
219
``` {r load-data, message = TRUE}
215
220
canlang_data <- read_csv("data/can_lang.csv")
216
221
```
217
222
218
223
\newpage
219
224
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
-
227
225
Finally, to view the first 10 rows of the data frame,
228
226
we must call it:
229
227
@@ -260,17 +258,12 @@ Non-Official & Non-Aboriginal languages,Amharic,22465,12785,200,33670
260
258
With this extra information being present at the top of the file, using
261
259
` read_csv ` as we did previously does not allow us to correctly load the data
262
260
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}
264
264
265
265
``` {r}
266
266
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}
274
267
canlang_data
275
268
```
276
269
0 commit comments