powered by
Check to see if the input is a valid (parseable) R code.
assert_is_valid_r_code(x, severity = getOption("assertive.severity", "stop"))is_valid_r_code(x, .xname = get_name_in_parent(x))
is_valid_r_code(x, .xname = get_name_in_parent(x))
Input to check.
How severe should the consequences of the assertion be? Either "stop", "warning", "message", or "none".
"stop"
"warning"
"message"
"none"
Not intended to be used directly.
TRUE if the input string is valid R code.
TRUE
parse
# NOT RUN { is_valid_r_code("x <- 1 + sqrt(pi)") is_valid_r_code("x <- ") is_valid_r_code("<- 1 + sqrt(pi)") # }
Run the code above in your browser using DataLab