pos_clpar: Get position of closing parenthesis

View source: R/misc.r

pos_clparR Documentation

Get position of closing parenthesis

Description

This function gets the position of the closing parenthesis after the first opening one

Usage

pos_clpar(x)

Arguments

x

character string for which the parenthesis should be searched

Value

a numeric with the position of the closing parenthesis (will be -1 if no match is present)

Author(s)

Richard Hooijmaijers

Examples


tst <- "IF (test == A(1)) a(1)=(1*5)/2"
pos_clpar(tst)
substring(tst,1,pos_clpar(tst))


amp.sim documentation built on May 7, 2026, 5:08 p.m.