Learn R Programming

icesSAG (version 1.2-0)

getSAG: Get Any SAG Data

Description

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

Usage

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

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.

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.

findKey finds lookup keys.

icesSAG-package gives an overview of the package.

Examples

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

## Not run: 
# cod_summary <- getSAG("cod", 2015)
# ## End(Not run)

Run the code above in your browser using DataLab