HighlanderLab / SIMplyBee

SIMplyBee R package extends AlphaSimR for simulating honeybee populations and breeding programmes
http://www.simplybee.info/
Other
0 stars 5 forks source link

setMisc() is not working on Colony-class and is not present for a MultiColony-class #512

Open janaobsteter opened 1 year ago

janaobsteter commented 1 year ago

So, the Colony-class has a @misc slot, but the setMisc() and getMisc() functions only work on Pop-class. Should we expand them?

Also, MultiColony-class doesn't have a @misc slot and I think we should add that for consistency but also functionality.

gregorgorjanc commented 1 year ago

Interesting catch!

So, you are saying we could have misc information at the pop/individual level in the Pop class, but also at the colony level in the Colony class, AND at the multi-colony (nation-wide colonies?) level in the MultiColony class?

What particular example has led you to this?

Of note, values in misc for the Pop class are for individuals, so if we have 10 individuals, we should have 10 values in every slot of the misc slot. Hence, we should only allow for 1 value per slot of the misc slot in Colony class and n values per slot of the misc slot in the MultiColony class.

janaobsteter commented 1 year ago

So, we DO have the misc slot in the Colony-class - in my simulation, I am sticking the beekeeper of the colony in there (the location isn't sufficient since one beekeeper could have apiaries at different locations). And that is what led me to think if the Pop-class and the Colony-class have it, than the MultiColony-class should have it too. I forgot if I had any specific info in mind that would go into the misc of a MultiColony though.

gregorgorjanc commented 1 year ago

@janaobsteter does the issue title still hold? That setMisc() and getMisc() don't work on Colonly class? It can be quite easy to extend the method to a different class!

gregorgorjanc commented 8 months ago

As discussed in https://github.com/gaynorr/AlphaSimR/issues/107 and proposed in https://github.com/gaynorr/AlphaSimR/pull/168 we should just simply use lists and then it is quite easy to work with the misc slot using basic R list code.