pfmc-assessments / sa4ss

Generate a stock assessment document from Stock Synthesis output
https://pfmc-assessments.github.io/sa4ss/
Other
12 stars 7 forks source link

add missing default png value for deprecated read_model() argument #66

Closed iantaylor-NOAA closed 1 year ago

iantaylor-NOAA commented 1 year ago

I was getting this error

r$> sa4ss::read_model(mod_loc = mod$inputs$dir, save_loc = file.path(getwd(), "doc"))
Error in pdf & png : 
  operations are possible only for numeric, logical or complex types

which I tracked down to sa4ss::read_model() passing a symbol for the png argument to to r4ss::SS_plots():

r$> sa4ss::read_model(mod_loc = mod$inputs$dir, save_loc = file.path(getwd(), "doc"))
Called from: sa4ss::read_model(mod_loc = mod$inputs$dir, save_loc = file.path(getwd(),
    "doc"))

Browse[1]> png

Browse[1]> str(png)
 symbol

This PR fixed the problem, but feel free to implement some other way.

iantaylor-NOAA commented 1 year ago

@kellijohnson-NOAA, relying on the r4ss default worked for me. Thank you @kellijohnson-NOAA.