This function can used to access or assign the fishery group labels contained within the sefraData object.
Usage
fishery_groups(object, ...)
# S4 method for class 'sefraData'
fishery_groups(object)
fishery_groups(object, ...) <- value
# S4 method for class 'sefraData,character'
fishery_groups(object) <- value
# S4 method for class 'sefraData,data.frame'
fishery_groups(object) <- valueSee also
See species_groups to access or assign species groups.
Examples
# assign character vector
dat <- sefraData(c('DIW', 'DQS', 'TWD'))
#> species codes input: including all species-dependent capture codes
#> constructed 'sefraData' object
fishery_groups(dat) <- c('flag1', 'flag2')
fishery_groups(dat)
#> 2 fishery groups
#> fishery_group id_fishery_group
#> 1 flag1 1
#> 2 flag2 2
# assign data frame of overlap values
dat <- sefraData(c('DIW', 'DQS', 'TWD'))
#> species codes input: including all species-dependent capture codes
#> constructed 'sefraData' object
fishery_groups(dat) <- data.frame(fishery_group = sample(c('fleet1', 'fleet2'), 10, replace = TRUE),
overlap = runif(10))
fishery_groups(dat)
#> 2 fishery groups
#> fishery_group id_fishery_group
#> 1 fleet2 1
#> 2 fleet1 2