problems_list: Lists problems in a directory.

Description Usage Arguments Details Value Examples

View source: R/problems.R

Description

Lists problems in a directory.

Usage

1
problems_list(path, group.sep = "-", exclude = NULL, basedir = NULL)

Arguments

path

character. Path to a directory that contains problems Rnw/Rmd, relative to basedir. This function assumes particular naming rules. For further details, see below.

group.sep

character. Character to indicate groups. For further details, see below.

exclude

character string containing a regular expression to be searched for. Files that match this pattern are excluded from the output.

basedir

character. Base directory relative to which Path is specified. Defaults to problems_dir in course.yml

Details

Problem filen ames should be like 01-abc.Rmd, 02-xyz.Rmd, where - is the character separating group (01, 02) and keyword (abc and xyz). You can use different group.sep than - (default) by specifying group.sep argument.

When the directory specified by the path argument contains 01-abc.Rmd, 01-def.Rmd and 02-xyz.Rmd, this function returns list(c("01-abc.Rmd", "01-def.Rmd"), "02-xyz.Rmd").

Value

List, which can be passed to exams function such as exams::exams2pdf.

Examples

1
2
3
4
5
## Not run: 
  path <- system.file("inst", "samples", package = "examtools")
  problems_list(path)

## End(Not run)

kenjisato/examtools documentation built on Feb. 5, 2020, 6:49 p.m.