Open janaobsteter opened 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.
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.
@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!
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.
So, the
Colony-class
has a@misc
slot, but thesetMisc()
andgetMisc()
functions only work onPop-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.