calcGrades: The grading function.

Description Usage Arguments Examples

View source: R/grade.r

Description

This function grades a bunch of R script assignments

Usage

1
2
3
4
5
6
calcGrades(
  submission_dir,
  your_test_file,
  suppress_warnings = TRUE,
  verbose = FALSE
)

Arguments

submission_dir

where the assignments are located

your_test_file

the path to your testthat test file (e.g. grade_hw1.R)

suppress_warnings

warning handlers prevent code from being run after they catch something. Suppress this behavior by setting this argument to TRUE.

verbose

set to true if you want to print the name of the file as it's being ran

Examples

1
2
3
4
# change paths to *your* paths
submissions <- "extdata/example/assignment1_submissions/"
my_test_file <- system.file("extdata/example", "grade_hw1.R", package = "gradeR")
results <- calcGrades(submissions, my_test_file)

gradeR documentation built on Sept. 5, 2021, 5:26 p.m.