clean_name
for all families
#305
Replies: 2 comments
-
An issue is that many of the families are from base R and so we can't modify them. We could add them to all families sdmTMB defines. Otherwise a small helper function might be the best solution. I'm not sure if that should be in the package exported/internal or kept external. |
Beta Was this translation helpful? Give feedback.
-
Ahh yes, thanks @seananderson I forgot that not all distributions are exported from {sdmTMB}. For the functionality of what I need, there is no reason to change {sdmTMB}, it really is not a big deal to change my own code and I already have. I more posted this as a discussion because I was wondering if similar objects within a package might want to have the same structure returned. The more that I think about this though, I think it is nice in theory but probably rarely practiced. So, if you want, feel free to close this Discussion. |
Beta Was this translation helpful? Give feedback.
-
I have code that looks up the
clean_name
entry in the object returned from functions such assdmTMB::delta_gamma()' and
sdmTMB::delta_lognormal_mix(). I ran into problems when I started adding models that used the Tweedie distribution because I now realize that not all distributions in {sdmTMB} return
clean_name`. I can easily work around this by searching for "mix" in other entries that are returned from the various distributions but I am wondering if there is a bigger question here ...Should all distributions supported by {sdmTMB} return an object with the same structure? For example, should
clean_name
always be an entry?Beta Was this translation helpful? Give feedback.
All reactions