st_within | R Documentation |
Returns a substring enclosed by two regular expression patterns.
By default returns the name of the arguments being indexed by
squared brackets ([]
) in a string containing an expression.
st_within(
x,
left = "[^_[:^punct:]]|\\b",
right = "\\[",
rm_left = 0,
rm_right = -1
)
x |
A character string. |
left |
A character string. Regular expression to serve as look ahead. |
right |
A character string. Regular expression to serve as a look behind. |
rm_left |
An integer. Number of bites after left-side match to remove from result. Defaults to -1. |
rm_right |
An integer. Number of bites after right-side match to remove from result. Defaults to 0. |
A character vector.
a <- '(XX[Y=0] == 1) > (XX[Y=1] == 0)'
CausalQueries:::st_within(a)
b <- '(XXX[[Y=0]] == 1 + XXX[[Y=1]] == 0)'
CausalQueries:::st_within(b)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.