calcGrades: The grading function.

View source: R/grade.r

calcGradesR Documentation

The grading function.

Description

This function grades a bunch of R script assignments

Usage

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

Value

a data.frame of all the scores for each student

Examples


# 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 Jan. 20, 2026, 1:06 a.m.