SSutils: SSutils

Description SSutils functions Author(s) Examples

Description

The SSutils package provides additional utilities for working with Stock Synthesis that are not found in the r4ss package.

SSutils functions

Author(s)

Ian G. Taylor

Examples

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
## Not run: 
  devtools::install_github('r4ss/SSutils')
  
  # copy model files to a bunch of new directories and
  # copy a new executable into each one
  outerdir.old <- 'c:/SS/modeltesting/Version_3.30.12.00_June22'
  outerdir.new <- 'c:/SS/modeltesting/Version_3.30.13_beta_Dec18'
  dir.info <- populate_multiple_folders(
      outerdir.old = outerdir.old,
      outerdir.new = outerdir.new,
      exe.dir = 'c:/SS/SSv3.30.13_beta_Dec18', overwrite=FALSE)

  # run the models in each directory
  run_SS_models(dirvec = dir(outerdir.new, full.names=TRUE))
  
  # read output
  mods.dir <- dir(outerdir.new, full.names=TRUE)
  mods.out <- SSgetoutput(dirvec=mods.dir)

  # run plotting functions
  for(imod in 1:length(mods.out)){
    print(imod)
    print(mods.dir[imod])
    graphics.off()
    SS_plots(mods.out[[imod]])
  }

  # check for successful completion of plots
  for(imod in 1:length(mods.dir)){
    print(imod)
    print(mods.dir[imod])
    print(file.info(file.path(mods.dir[imod], "plots/SS_output.html"))$size)
  }

## End(Not run)

r4ss/SStesting documentation built on July 7, 2020, 12:11 p.m.