A basic example showing how to use afscISS
for a
production run.
library(afscISS)
#> Loading required package: data.table
# 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 case
Plot the length composition ISS.
plot_ISS(species = species,
region = region,
comp = comp,
sex_cat = sex_cat,
spec_case = spec_case)
Get the length composition data frame.
get_comp(species = species,
region = region,
comp = comp,
sex_cat = sex_cat,
spec_case = spec_case)
#> # A tidytable: 557 × 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.00808 0 0.0296
#> 2 1990 301502 4 4 23 0.00404 0 0.0195
#> 3 1990 301502 4 4 24 0.00202 0 0.0116
#> 4 1990 301502 4 4 25 0.00606 0 0.0254
#> 5 1990 301502 4 4 27 0.00649 0 0.0226
#> 6 1990 301502 4 4 28 0.00606 0 0.0214
#> 7 1990 301502 4 4 29 0.00657 0 0.0274
#> 8 1990 301502 4 4 31 0.00102 0 0.00572
#> 9 1990 301502 4 4 32 0.00692 0 0.0274
#> 10 1990 301502 4 4 33 0.000736 0 0.00344
#> # ℹ 547 more rows
Examine 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: 511 × 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.00263 0 0.0135
#> 2 1990 301502 4 4 7 0.00103 0 0.00393
#> 3 1990 301502 4 4 8 0.00107 0 0.00537
#> 4 1990 301502 4 4 9 0.00813 0.000927 0.0270
#> 5 1990 301502 4 4 10 0.108 0.00817 0.340
#> 6 1990 301502 4 4 11 0.131 0.00280 0.310
#> 7 1990 301502 4 4 12 0.112 0.00391 0.291
#> 8 1990 301502 4 4 13 0.152 0.00172 0.352
#> 9 1990 301502 4 4 14 0.200 0.0445 0.402
#> 10 1990 301502 4 4 15 0.100 0.00940 0.247
#> # ℹ 501 more rows