getLandings | R Documentation |
Prepares a Landings object as required by eca.predict
.
getLandings(
landings,
covariates,
covariateMaps,
date = NULL,
month = NULL,
quarter = NULL
)
landings |
data.table() with total landings (as in
|
covariates |
character() vector of covariates used in model |
covariateMaps |
list() mapping covariate values from integers used in RECA to values used in 'landings'. For a covarate 'cov', the integer i is used for value a, when covariateMaps[[cov]][[i]] == a |
date |
POSIXct() vector, matching the number of rows in 'landings', date of catch, see details. |
month |
integer() vector, matching the number of rows in 'landings', month of catch (1 for January, etc.), see details. |
quarter |
integer() vector, vector, matching the number of rows in 'landings', quarter of catch (1 for Q1, etc.), see details. |
The parameters 'date', 'month', and 'quarter' are used to set the temporal resolution for catch at age prediction. Provide exactly one of these, and set the other ones to NULL. Temporal resolution need not match any temporal covariate used. One can for example run with month, even if Quarter is a covariate in the model.
Landings object as required by eca.predict
data(catchsamples)
data(landings)
catchsamples$Metier5 <- catchsamples$LEmetier5
landings$Metier5 <- landings$FishingActivityCategoryEuropeanLvl5
covMap <- getCovariateMap("Metier5", catchsamples, landings)
getLandings(landings, c("Metier5"), covMap, month=landings$Month)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.