matching_parens | R Documentation |
Finds matching parentheses in a string. Returns a data frame with each row representing a matching pair of parentheses, 'op' being the opening position and 'cl' being the closing position. If processed in row order, you should never see an outer set before its inner set(s)
matching_parens(text)
text |
data frame with matching pair positions
txt <- "((x + 5) * (y - 7)) / (z^2 + 4)"
matching_parens(txt)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.