getSAG | R Documentation |
This function combines the functionality of getListStocks
,
getFishStockReferencePoints
, getSummaryTable
and getStockDownloadData
.
It supports querying many stocks and years in one function call.
getSAG(stock, year, data = "summary", combine = TRUE, purpose = "Advice")
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", "refpts" or "source". |
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". |
A data frame (default) or a list if combine
is TRUE
.
Only years with "Published" status are returned.
Colin Millar.
getListStocks
, getSummaryTable
,
getFishStockReferencePoints
, and
getStockDownloadData
get a list of stocks, summary
results, reference points, and all data including custom columns.
findAssessmentKey
finds lookup keys.
icesSAG-package
gives an overview of the package.
## Not run:
summary <- getSAG("had.27.46a20", 2022)
refpts <- getSAG("had.27.46a20", 2022, "refpts")
cod_summary <- getSAG("cod", 2022)
cod_refpts <- getSAG("cod", 2015:2016, "refpts")
cod_data <- getSAG("cod", 2017, "source-data")
## End(Not run)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.