str.blocks.pos: Returns a pos matrix indicating blocks like brackets ( ) or...

View source: R/stringtools.R

str.blocks.posR Documentation

Returns a pos matrix indicating blocks like brackets ( ) or quoted parts "text"

Description

We allow for nested blocks. The position matrix also has an attribute level that describes the level of each block

Usage

## S3 method for class 'blocks.pos'
str(str, start, end, ignore = NULL,
  ignore.start = ignore, ignore.end = ignore, fixed = TRUE,
  fixed.start = fixed, fixed.end = fixed)

Examples

## Not run: 
  str = '1+(5*(2+3)+(2+(4-1)))'
#        123456789012345678901  
  str.blocks.pos(str,"(",")")
  

## End(Not run)

skranz/stringtools documentation built on May 11, 2022, 4:48 a.m.