Learn R Programming

icesVocab (version 1.3.1)

getCodeTypeRelation: Get Details

Description

Get details for a given code.

Usage

getCodeTypeRelation(code_type, linked_code_type, rename = TRUE)

Value

A data frame.

Arguments

code_type

an ICES Vocabulary code type.

linked_code_type

another ICES Vocabulary code type.

rename

logical, if TRUE (default) the columns of the output is renamed to the code type and linked code type

See Also

getCodeTypeList and getCodeList get code types and codes of a given type.

icesVocab-package gives an overview of the package.

Examples

Run this code
if (FALSE) {
x <- getCodeTypeRelation("Pargroup", "PARAM")

# get all stocks in subarea 4a
# note you would need to cross check with icesSD for
# currently active stocks
lookup <- getCodeTypeRelation("ICES_Area", "ICES_StockCode")
lookup[lookup$ICES_Area == "27.4.a", ]

# get relation between stock code and area, unformatted output
lookup_raw <- getCodeTypeRelation("ICES_StockCode", "ICES_Area", rename = FALSE)
head(lookup_raw)
}

Run the code above in your browser using DataLab