timjmiller / wham

State-space, age-structured fish stock assessment model
https://timjmiller.github.io/wham
Other
32 stars 16 forks source link

Plot_wham_output() missing variable yr.col #40

Open tcarruth opened 3 years ago

tcarruth commented 3 years ago

Line 187 of EGB_WHAM_tjm.R is:

plot_wham_output(mod=m1, out.type='html')

This returns the error:

Error in plot.xy(xy.coords(x, y), type = type, ...) : object 'yr.col' not found

As a temporary fix this is solved by:

yr.col<<-rainbow(100,start=0.2,end=1) # FLAG github issue plot_wham_output(mod=m1, out.type='html') # without yr.col definition this does not work

brianstock-NOAA commented 3 years ago

Hi Tom,

This looks familiar, think I just fixed this: https://github.com/timjmiller/wham/commit/b8e74843ee4596989ab88a9ec24e5dbe90b156f7. At least, I don't get the above error. Try re-installing the devel branch of WHAM:

devtools::install_github("timjmiller/wham", ref="devel", dependencies=TRUE)

Thanks for making it easy to check by creating the repo with saved fit model object!

brianstock-NOAA commented 3 years ago

Hi Tom, I believe this is fixed. Can you install the new version we just released, try again, and either close this issue or post an error?

devtools::install_github("timjmiller/wham", dependencies=TRUE)