---
title: "Basic example"
output: rmarkdown::html_vignette
vignette: >
  %\VignetteIndexEntry{basic_example}
  %\VignetteEngine{knitr::rmarkdown}
  %\VignetteEncoding{UTF-8}
---

```{r, include = FALSE}
knitr::opts_chunk$set(
  collapse = TRUE,
  comment = "#>"
)
```

A basic example showing how to use `afscISS` for a production run.

```{r setup}
library(afscISS)

# 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.

```{r}
plot_ISS(species = species,
         region = region,
         comp = comp,
         sex_cat = sex_cat,
         spec_case = spec_case)
```

Get the length composition data frame.

```{r}
get_comp(species = species,
         region = region,
         comp = comp,
         sex_cat = sex_cat,
         spec_case = spec_case)
```

Examine the same items for age composition data.

```{r}
plot_ISS(species = species,
         region = region,
         comp = 'age',
         sex_cat = sex_cat,
         spec_case = spec_case)
```

Get the age composition data frame.

```{r}
get_comp(species = species,
         region = region,
         comp = 'age',
         sex_cat = sex_cat,
         spec_case = spec_case)
```
