test_one_file: Test all tasks in rmarkdown file

Description Usage Arguments Author(s) Examples

Description

This function takes a file, searches all kye_words using key_word_prefix argument and then tests associated with all keywords r chunks. Then function compare the results with the expected value and return a dataframe containing file name, author, check results and number of corrected answers.

Usage

1
test_one_file(expectations, file, keyword_prefix = "### ", group = FALSE)

Arguments

expectations

an expected values.

file

an rmarkdown file or an r charactor vector.

keyword_prefix

a common part of all keywords. By default is "### ".

group

logical. If TRUE, function searches first line with the "group:" argument and returns it in the summary.

Author(s)

George Moroz <agricolamz@gmail.com>

Examples

1
2
3
fit <- lm(mpg~cyl, mtcars)
test_one_file(list(2+2, fit$coefficients), test_1)
test_one_file(list(2+2, 42), test_1)

agricolamz/AssignmentCheck documentation built on May 10, 2019, 7:34 a.m.