getCovariateMap | R Documentation |
Constructs a covariate map for R-ECA
getCovariateMap(covariate, samples, landings)
covariate |
character() name of covariate to make map for |
samples |
data.table() the samples the covariate mapping should be defined for (must contain column specified by 'covariate') |
landings |
data.table() the landings the covariate mapping should be defined for (may contain column specified by 'covariate') |
RECA require all covariate to be formatted as integers. In order to maintain connection to other formats for the covariates, they should be converted back and forth with a pre-defined covariate map
list() where the nth member represents the RECA covariate value 'n', so that for a covarate 'cov', the integer i is used for value a, when covariateMaps[[cov]][[i]] == a
data(catchsamples)
data(landings)
catchsamples$Metier5 <- catchsamples$LEmetier5
landings$Metier5 <- landings$FishingActivityCategoryEuropeanLvl5
getCovariateMap("Metier5", catchsamples, landings)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.