add_paren {lazy.tools}R Documentation

Add Enclosing Parentheses

Description

Add Enclosing Parentheses

Usage

add_paren(exp, check = 0, trim = 0)

Arguments

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.

Value

an object of the same size as exp

Examples

exp=c("a","(a+b)","(a+b)-(c-d)")
add_paren( exp )
add_paren( exp, check=1 )


[Package lazy.tools version 0.1.3 Index]