Learn R Programming

rgoogleclassroom (version 1.0.0)

parse_quiz_df: Parse quiz into a data.frame

Description

Parse quiz into a data.frame

Usage

parse_quiz_df(quiz_lines, remove_tags = FALSE)

Value

A data frame containing a type column which indicates what type of line each is.

Arguments

quiz_lines

A character vector of the contents of the markdown file obtained from readLines()

remove_tags

TRUE/FALSE remove tags and empty lines?

Examples

Run this code
if (FALSE) {

# Use readLines() to read in a quiz
quiz_path <- good_quiz_path()
quiz_lines <- readLines(quiz_path)

# Can use this to parse the quiz into a data.frame
quiz_df <- parse_quiz_df(quiz_lines)
}

Run the code above in your browser using DataLab