gadget-framework / rgadget

Rgadget is a set of useful utilities for gadget
6 stars 12 forks source link

gadget.skeleton error #77

Closed niafall closed 6 years ago

niafall commented 6 years ago

Hi all;

When calling gadget.skeleton using a stock options object as generated using gadget.options I am currently getting the following error:

Error in eval(cols[[col]], .data, parent.frame()) : 
  object 'recsigma' not found

I don't believe I have gotten this error before, and I am unsure what "recsigma" refers to. Can anyone advise?

Niall

bthe commented 6 years ago

These functions have certainly not been touched in the past couple of years so I'm not sure what could have changed here. It would be helpful if you could do a traceback on the error. The recsigma refers to the standard deviation in recruitment length, which you can edit by using opt$sigma.

Note however that this functionality is deprecated and will be removed in the foreseeable future, I suggest that you look into the gadget-update functionality (e.g see https://github.com/fishvice/gadget-models/tree/master/06-ling/00-setup )

pfrater commented 6 years ago

This is just a weird glitch in gadget.skeleton. If I remember correctly, if you just add an extra value into the vector of standard deviations (i.e. make the length + 1), then it should go without error, but it won't actually add that last value into the gadget files because it gets trimmed to appropriate length.

As Bjarki said, though, this function is deprecated and you should move to the gadgetstock and gadget_update functions.