parse_id.BranchStructs: parse_id.BranchStructs

View source: R/BranchStructs_methods.r

parse_id.BranchStructsR Documentation

parse_id.BranchStructs

Description

parse the plot, tree tag, and branch identifier out from the concatenated identifier

Usage

## S3 method for class 'BranchStructs'
parse_id(
  obj,
  treetag_regex = "[^.]+",
  branch_regex = "B\\d+(SH|S|H)",
  treetag_sec_no = 2,
  branch_sec_no = 3,
  nobranchcode = F,
  ...
)

Arguments

obj

treestruct object

treetag_regex

regex to match tree tag, Default: ⁠[^.]+⁠

branch_regex

regex to match branchcode, Default: ⁠B\\d+(SH|S|H)⁠

treetag_sec_no

which section of the string (separated by ⁠[_-]⁠) contains the treetag? Default: 2

branch_sec_no

which section of the string (separated by ⁠[_-]⁠) contains the branch code? Default: 3

nobranchcode

set to TRUE if there is no branch code in the identifier, Default: FALSE

Details

This function assumes the id column (idcol) is in the form of "plotcode-treecode-branchcode"

Value

treestruct object

Examples

## Not run: 
if(interactive()){
 #EXAMPLE1
 }

## End(Not run)

ashenkin/treestruct documentation built on June 11, 2025, 10:40 a.m.