Learn R Programming

Ottr

Ottr is a client-side R autograding package that is designed to be mixed into Otter-Grader to extend it to R Jupyter Notebooks, R scripts, and Rmd documents.

For more details about ottr and its usage, see the Otter-Grader documentation.

Copy Link

Version

Install

install.packages('ottr')

Monthly Downloads

301

Version

1.5.3

License

BSD_3_clause + file LICENSE

Maintainer

Christopher Pyles

Last Published

October 12th, 2025

Functions in ottr (1.5.3)

grade_script

Grade an R script against a series of test files
get_collector

Retrieve the global CheckCollector
initialize_collector

Create a new global CheckCollector
load_test_cases

Load test cases from a test file
TestFileResult

An R6 class representing a collection of test case results
execute_script

Generate an environment from an R script
collector_env

An environment into which a collector will be initialized (so we don't need to update global variables).
TestCase

An R6 class representing a test case
check

Run the test cases in a test file
TestCaseResult

An R6 representing the results of running a test case
GradingResults

An R6 class representing a collection of test case results
CheckCollector

An R6 class for collecting TestFileResult objects during grading.
export

Export a submission to a zip file
run_autograder

Grade an R script against test files in a directory
running_on_jupyter

Determine whether this R session is running on Jupyter.
valid_syntax

Check whether a string is valid R code
collector_varname

The name of the active collector variable in collector_env
save_notebook

Attempt to save the current notebook.
update_ast_check_calls

Collect results of calls to ottr::check in an AST