Skip to content

Commit

Permalink
put in some mods to vignette
Browse files Browse the repository at this point in the history
  • Loading branch information
jimianelli committed Aug 6, 2024
1 parent 0a2f219 commit 67fe268
Showing 1 changed file with 4 additions and 7 deletions.
11 changes: 4 additions & 7 deletions vignettes/00-spm-example.Rmd
Original file line number Diff line number Diff line change
Expand Up @@ -94,9 +94,7 @@ inp <- spmR::dat2list(here::here("examples","BSAI NRS","spm.dat"))
fc <- data.frame(Year=inp$fixed_catch[,1], mean=inp$fixed_catch[,2], type='C')# |>
names(fc) <- c("Year", "mean", "type")
fc <- fc |> expand_grid(Alt=c(1,3,5,7)) |> mutate(Alt=as.factor(Alt), ub=mean,lb=mean)
fc
p1$data
p1 + geom_point(data=fc,aes(x=Year,y=mean))
plotSPM(df) + geom_point(data=fc,aes(x=Year,y=mean))
#p1$data
```

Expand Down Expand Up @@ -131,11 +129,10 @@ plotSPM(df)

First we'll run this model with only 3-years fixed catch assumed

```{r goa_fhs,eval=TRUE,echo=FALSE}
# df <- runSPM(here::here("examples","goa_flathead/maia"),run=TRUE)
```{r goa_fhs,eval=TRUE,echo=TRUE}
inp <- spmR::dat2list(here::here("examples","goa_flathead","spmorig.dat"))
spmR::list2dat(inp,here::here("examples","goa_flathead","spm.dat"))
bdf <- runSPM(here::here("examples","goa_flathead"),run=TRUE)
bdf <- runSPM(here::here("examples","goa_flathead"),run=FALSE)
df <- readr::read_csv(here::here("examples","goa_flathead","spm_summary.csv"))
plotSPM(df)
# p1<- plotSPM(df)
Expand All @@ -151,7 +148,7 @@ inp$nyrs_fixed_catch <- 5
inp$fixed_catch <- rbind(inp$fixed_catch, c(2025, 1100), c(2026, 1100))
inp$fixed_catch
spmR::list2dat(inp,here::here("examples","goa_flathead","spm.dat"))
bdf <- runSPM(here::here("examples","goa_flathead"),run=TRUE)
bdf <- runSPM(here::here("examples","goa_flathead"),run=FALSE)
df <- readr::read_csv(here::here("examples","goa_flathead","spm_summary.csv"))
plotSPM(df)
Expand Down

0 comments on commit 67fe268

Please sign in to comment.