parse_quiz_df: Parse quiz into a data.frame

View source: R/quiz_formatting.R

parse_quiz_dfR Documentation

Parse quiz into a data.frame

Description

Parse quiz into a data.frame

Usage

parse_quiz_df(quiz_lines, remove_tags = FALSE)

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?

Value

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

Examples

## Not run: 

# 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)

## End(Not run)

ottrpal documentation built on April 3, 2025, 7:46 p.m.