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.0282
#> 2 1990 301502 4 4 23 0.00403 0 0.0161
#> 3 1990 301502 4 4 24 0.00201 0 0.00951
#> 4 1990 301502 4 4 25 0.00604 0 0.0206
#> 5 1990 301502 4 4 27 0.00647 0 0.0219
#> 6 1990 301502 4 4 28 0.00604 0 0.0248
#> 7 1990 301502 4 4 29 0.00655 0 0.0244
#> 8 1990 301502 4 4 31 0.00102 0 0.00452
#> 9 1990 301502 4 4 32 0.00690 0 0.0254
#> 10 1990 301502 4 4 33 0.000737 0 0.00314
#> # ℹ 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.00262 0 0.0139
#> 2 1990 301502 4 4 7 0.00103 0.0000299 0.00383
#> 3 1990 301502 4 4 8 0.00107 0 0.00477
#> 4 1990 301502 4 4 9 0.00813 0.000532 0.0281
#> 5 1990 301502 4 4 10 0.108 0.00619 0.331
#> 6 1990 301502 4 4 11 0.131 0.00239 0.303
#> 7 1990 301502 4 4 12 0.112 0.00743 0.291
#> 8 1990 301502 4 4 13 0.152 0.00863 0.357
#> 9 1990 301502 4 4 14 0.200 0.0427 0.412
#> 10 1990 301502 4 4 15 0.100 0.00760 0.278
#> # ℹ 534 more rows