ensure_parens.Rd
Opening and closing parens will be added if an opening paren is not the first non-whitespace character.
ensure_parens(x)
x | a list or vector |
---|
x
is returned, possibly modified with parens added.
ensure_parens(letters[1:4])#> [1] "(a)" "(b)" "(c)" "(d)"#> [[1]] #> [1] "(a)" #> #> [[2]] #> [1] "(b)" #> #> [[3]] #> [1] "(c)" #> #> [[4]] #> [1] "(d)" #>#> [1] "(a)" "(b)" "(c)"