parse_id.BranchStructs: parse_id.BranchStructs

Description Usage Arguments Details Value Examples

View source: R/BranchStructs_methods.r

Description

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

Usage

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
## 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

1
2
3
4
5
6
## Not run: 
if(interactive()){
 #EXAMPLE1
 }

## End(Not run)

ashenkin/treestruct documentation built on Oct. 14, 2021, 1:54 a.m.