icesSAG (version 1.3-4)

getSAG: Get Any SAG Data

Description

This function combines the functionality of getListStocks, getFishStockReferencePoints, and getSummaryTable. It supports querying many stocks and years in one function call.

Usage

getSAG(stock, year, data = "summary", combine = TRUE, purpose = "Advice")

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.

data

the data of interest, either "summary" or "refpts".

combine

whether to combine the list output to a data frame.

purpose

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

Value

A data frame (default) or a list if combine is TRUE.

See Also

getListStocks, getSummaryTable, and getFishStockReferencePoints get a list of stocks, summary results, and reference points.

findAssessmentKey finds lookup keys.

icesSAG-package gives an overview of the package.

Examples

Run this code
# NOT RUN {
summary <- getSAG("cod-347d", 2015)
refpts <- getSAG("cod-347d", 2015, "refpts")

getSAG("her.27.3a47d", 2017, "refpts", purpose = "Benchmark")

cod_summary <- getSAG("cod", 2015)
cod_refpts <- getSAG("cod", 2015:2016, "refpts")
# }

Run the code above in your browser using DataCamp Workspace