enable_safe_eval: Enable Safe Evaluation of User Code for 'learnr' Exercises

enable_safe_evalR Documentation

Enable Safe Evaluation of User Code for learnr Exercises

Description

Enable Safe Evaluation of User Code for learnr Exercises

Usage

enable_safe_eval(
  max_fsize = 1L,
  envir = new.env(),
  max_address_space = 2048L,
  max_data = 256L,
  priority = 20L,
  rlimits,
  allow_env,
  force_safe_unix = FALSE,
  default_allow_env = c("^SHELL$", "^USER$", "^LANG$", "^LC_CTYPE$", "^HOME$",
    "^DYLD_FALLBACK_LIBRARY_PATH$", "^R_.*")
)

Arguments

max_fsize

maximum size of created files in MiB.

envir

the R environment where the R expression is evaluated.

max_address_space

maximum size of the address space in MiB.

max_data

maximum size of the data memory in MiB.

priority

priority of the evaluating process.

rlimits

specify custom rlimitis.

allow_env

vector of regular expressions of allowed environment variables (i.e., the matching variables will be retained).

force_safe_unix

force the use of the unix::eval_safe() function for evaluating user code. The unix package is not available on Windows and is not used by default on macOS.

default_allow_env

vector of regular expressions of environment variables which should be allowed by default. Only change if you know what you are doing, as most of them are fundamental to the R process to work.


dakep/stat305templates documentation built on Nov. 27, 2022, 8:23 a.m.