A basic example showing how to use afscISS for
a production run.
library(afscISS)
#> Loading required package: data.table
#>
#> Attaching package: 'data.table'
#> The following object is masked from 'package:base':
#>
#> %notin%
# set some globals
species = c(30150, 30152) # dusky rockfish
region = 'goa'
comp = 'length'
sex_cat = 4 # post expansion
spec_case = 'dr' # dusky rockfish is a special casePlot the length composition ISS.
Get the length composition data frame.
get_comp(species = species,
region = region,
comp = comp,
sex_cat = sex_cat,
spec_case = spec_case)
#> # A tidytable: 580 × 8
#> year species_code sex sex_c length prop q2_5th q97_5th
#> <dbl> <dbl> <dbl> <dbl> <dbl> <dbl> <dbl> <dbl>
#> 1 1990 301502 4 4 22 0.00805 0 0.0316
#> 2 1990 301502 4 4 23 0.00403 0 0.0169
#> 3 1990 301502 4 4 24 0.00201 0 0.00871
#> 4 1990 301502 4 4 25 0.00604 0 0.0254
#> 5 1990 301502 4 4 27 0.00645 0 0.0222
#> 6 1990 301502 4 4 28 0.00604 0 0.0227
#> 7 1990 301502 4 4 29 0.00655 0 0.0244
#> 8 1990 301502 4 4 31 0.00101 0 0.00491
#> 9 1990 301502 4 4 32 0.00686 0 0.0234
#> 10 1990 301502 4 4 33 0.000789 0 0.00369
#> # ℹ 570 more rowsExamine the same items for age composition data.
plot_ISS(species = species,
region = region,
comp = 'age',
sex_cat = sex_cat,
spec_case = spec_case)Get the age composition data frame.
get_comp(species = species,
region = region,
comp = 'age',
sex_cat = sex_cat,
spec_case = spec_case)
#> # A tidytable: 544 × 8
#> year species_code sex sex_c age prop q2_5th q97_5th
#> <dbl> <dbl> <dbl> <dbl> <dbl> <dbl> <dbl> <dbl>
#> 1 1990 301502 4 4 6 0.00260 0 0.0177
#> 2 1990 301502 4 4 7 0.00117 0 0.00387
#> 3 1990 301502 4 4 8 0.00106 0 0.00566
#> 4 1990 301502 4 4 9 0.00809 0.000894 0.0266
#> 5 1990 301502 4 4 10 0.108 0.0102 0.311
#> 6 1990 301502 4 4 11 0.131 0.00948 0.317
#> 7 1990 301502 4 4 12 0.112 0 0.307
#> 8 1990 301502 4 4 13 0.152 0.0111 0.366
#> 9 1990 301502 4 4 14 0.200 0.0471 0.421
#> 10 1990 301502 4 4 15 0.1000 0.00839 0.281
#> # ℹ 534 more rows