From 9a53e6231639b17b45b08cde96d1b4c5d20b2337 Mon Sep 17 00:00:00 2001 From: Graham Bleach Date: Mon, 5 Sep 2022 21:52:28 +0100 Subject: [PATCH] Fix yaml scanner error Previously I saw this error when trying to load the "Manipulating data with dplyr" lesson: Error in yaml.load(readLines(con, warn = readLines.warn), error.label = error.label, : (/home/gdb/R/x86_64-pc-linux-gnu-library/4.2/swirl/Courses/Getting_and_Cleaning_Data/Manipulating_Data_with_dplyr/lesson.yaml) Scanner error: while scanning a tag at line 205, column 9 did not find expected whitespace or line break at line 205, column 19 Enclosing the string that starts with a '!' in single quotes fixes this. --- .../Manipulating_Data_with_dplyr/lesson.yaml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Getting_and_Cleaning_Data/Manipulating_Data_with_dplyr/lesson.yaml b/Getting_and_Cleaning_Data/Manipulating_Data_with_dplyr/lesson.yaml index cd7eebd9..c16d52ad 100644 --- a/Getting_and_Cleaning_Data/Manipulating_Data_with_dplyr/lesson.yaml +++ b/Getting_and_Cleaning_Data/Manipulating_Data_with_dplyr/lesson.yaml @@ -202,7 +202,7 @@ Output: 'Now, put an exclamation point (!) before is.na() to change all of the TRUEs to FALSEs and all of the FALSEs to TRUEs, thus telling us what is NOT NA: !is.na(c(3, 5, NA, 10)).' CorrectAnswer: "!is.na(c(3, 5, NA, 10))" AnswerTests: omnitest('!is.na(c(3, 5, NA, 10))') - Hint: !is.na(c(3, 5, NA, 10)) will negate the previous command, thus telling us what is NOT NA. + Hint: '!is.na(c(3, 5, NA, 10)) will negate the previous command, thus telling us what is NOT NA.' - Class: cmd_question Output: 'Okay, ready to put all of this together? Use filter() to return all rows of cran for which r_version is NOT NA. Hint: You will need to use !is.na() as part of your second argument to filter().'