processLenGrpHeader: Process a length grup header.

Description Usage Arguments Details Value Examples

View source: R/imrsts.R

Description

processLenGrpHeader returns a length group header translation.

Usage

1
2
3
4
5
6
7
8
processLenGrpHeader(
  tblResult,
  target = "LenGrp",
  prefix = "",
  rangeSeparator = "-",
  plusAgeChar = "+",
  sep = " "
)

Arguments

tblResult

REDUS STS data table.

target

Column name of the length groups category.

prefix

Prefix for the headers.

rangeSeparator

Range separator character.

plusAgeChar

Plus age character.

sep

Separator character.

Details

For example an original length group header of c('5', '10', '15') is transformed into c('5'='5-9', '10'='10-15', '15'='15+').

Value

On a valid input a character object (list) will be returned.

Examples

1
2
3
4
5
## Not run: 
stsData <- loadSTS("Barents Sea Northeast Arctic cod bottom trawl index in winter")
headerTranslation <- processLenGrpHeader(stsData$data2)

## End(Not run)

REDUS-IMR/REDUStools documentation built on Sept. 23, 2021, 12:51 a.m.