add_paren {lazy.tools} | R Documentation |
Add Enclosing Parentheses
add_paren(exp, check = 0, trim = 0)
exp |
a string vector consisting of symbolic expressions.. |
check |
= 1 to avoid adding redundant parens. |
trim |
= 1 to remove leading and trailing blanks from exp. |
an object of the same size as exp
exp=c("a","(a+b)","(a+b)-(c-d)")
add_paren( exp )
add_paren( exp, check=1 )