Turn unevaluated expressions into character strings.

safeDeparse(expr, ...)

Arguments

expr

expression. Any R expression.

...

Passed to deparse().

Value

character(1).

Details

safeDeparse() is modified version of deparse() that always returns character(1).

See also

Examples

safeDeparse(is.character("a"))
#> [1] "TRUE"