Learn R Programming

icesSAG (version 1.2-0)

findKey: Find a Key

Description

Find a lookup key corresponding to a stock in a given assessment year.

Usage

findKey(stock, year = 0, published = TRUE, regex = TRUE, full = FALSE)

Arguments

stock
a stock name, e.g. cod-347d, or cod to find all cod stocks, or NULL to process all stocks.
year
the assessment year, e.g. 2015, or 0 to process all years.
published
whether to include only years where status is "Published".
regex
whether to match the stock name as a regular expression.
full
whether to return a data frame with all stock list columns.

Value

A vector of keys (default) or a data frame if full is TRUE.

See Also

getListStocks gets a list of stocks.

icesSAG-package gives an overview of the package.

Examples

Run this code
findKey("cod-347d", 2015, full = TRUE)

Run the code above in your browser using DataLab