Skip to content

YAML parsing error in "2. Getting and Cleaning Data" course "1. Manipulating data with dplyr." lesson.yaml #938

@Tek-Spec

Description

@Tek-Spec

I encountered a YAML parsing error when attempting to run Lesson 1: Manipulating data with dplyr from the “Getting and Cleaning Data” course using swirl().

The error message was:

Error in yaml.load(readLines(con, warn = readLines.warn), error.label = error.label, :
(C:/Path/To/File/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

The issue came from line 205 in lesson.yaml:

Hint: !is.na(c(3, 5, NA, 10)) will negate the previous command, thus telling us what is NOT NA.

This line causes YAML to misinterpret !is.na(...) as a tag. The fix was to wrap the value in quotes:

Hint: "!is.na(c(3, 5, NA, 10)) will negate the previous command, thus telling us what is NOT NA."

This resolved the error and the lesson loaded correctly.

Thanks again for maintaining such a valuable educational tool!

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions