interpret: Check safety of evaluating string as R code.

View source: R/modules-sc-utils.R

interpretR Documentation

Check safety of evaluating string as R code.

Description

Check safety of evaluating string as R code.

Usage

interpret(
  expr_str,
  max_length = 200,
  whitelist = c("&", ">=", "<=", ">", "<", "|", "==", "!=", "*")
)

Arguments

expr_str

String to evaluate,

max_length

maximum length of string to evaluate,

whitelist

R functions to allow use of.

Value

TRUE if expression is safe, otherwise FALSE.


hms-dbmi/drugseqr documentation built on Feb. 15, 2024, 10:38 p.m.