icesSAG (version 1.3-4)

stockInfo: Create a list of fish stock information

Description

This function is a wrapper to list(...) in which the names are forced to match with the names required for the SAG database. See http://dome.ices.dk/datsu/selRep.aspx?Dataset=126 for more details.

Usage

stockInfo(StockCode, AssessmentYear, ContactPerson, StockCategory,
  Purpose = "Advice", ModelType, ModelName, ...)

Arguments

StockCode

a stock name, e.g. cod-347d.

AssessmentYear

the assessment year, e.g. 2015.

ContactPerson

the email for the person responsible for uploading the stock data.

StockCategory

Category of the assessment used (see below)

Purpose

the purpose of the entry, options are "Advice", "Bench", "InitAdvice", default is "Advice".

ModelType

the type of the model used (see below for links to more information)

ModelName

the name (acronym) of the model used if available (see below for links to more information)

...

additional information, e.g. BMGT, FMSY, RecruitmentAge, ...

Value

A named sag.list, inheriting from a list, where all names are valid column names in the SAG database.

See Also

Links to the relevant ICES vocabularies list are here StockCode: http://vocab.ices.dk/?ref=357 StockCategory: http://vocab.ices.dk/?ref=1526 Purpose: http://vocab.ices.dk/?ref=1516 ModelType: http://vocab.ices.dk/?ref=1524 ModelName: http://vocab.ices.dk/?ref=1525

Link to the relevant format description is http://datsu.ices.dk/web/selRep.aspx?Dataset=126

Examples

Run this code
# NOT RUN {
info <-
  stockInfo(StockCode = "cod.27.47d20",
            AssessmentYear = 2017,
            StockCategory = 1,
            ModelType = "A",
            ModelName = "SCA",
            ContactPerson = "itsme@fisheries.com")

 info
 info$mistake <- "oops"
 info
 # should have gotten a warning message

 # use icesVocab to list valid codes etc.
 library(icesVocab)
 # print the list of valid stock codes
 stock.codes <- getCodeList("ICES_StockCode")
 stock.codes[1:10,1:2]

 # print the list of assessment model types in the ICES vocabulary
 model.types <- getCodeList("AssessmentModelType")
 model.types[1:2]

 # print the list of assessment model names in the ICES vocabulary
 model.names <- getCodeList("AssessmentModelName")
 model.names$Key

# }

Run the code above in your browser using DataLab