execute_script: Execute a string as an R script and return the environment...

Description Usage Arguments Value

View source: R/ottr.r

Description

Converts a string to an AST and executes that script in a dummy environment for running test cases against. Transforms all expressions of the form . = ottr::check(...) by replacing the . with an index into a list in the environment with name check_results_{SECRET} to collect the test_suite_result objects generated from those checks. (This helps to handle variable name collisions in tests when grading a script.)

Usage

1
execute_script(script, secret, ignore_errors)

Arguments

script

The string to be executed

secret

The string to be appended to the name check_results_ as the list name to collect results

Value

The global environment after executing the script


supark-uncc/ottr documentation built on Dec. 23, 2021, 6:41 a.m.