This function gets the position of the closing parenthesis after the first opening one
Examples
tst <- "IF (test == A(1)) a(1)=(1*5)/2"
pos_clpar(tst)
#> -1
#> 17
substring(tst,1,pos_clpar(tst))
#> [1] "IF (test == A(1))"
This function gets the position of the closing parenthesis after the first opening one
tst <- "IF (test == A(1)) a(1)=(1*5)/2"
pos_clpar(tst)
#> -1
#> 17
substring(tst,1,pos_clpar(tst))
#> [1] "IF (test == A(1))"