Closed gregorgorjanc closed 2 years ago
One way to do this is via deparse(substitute(pop))
- got it from Ivan!
Not critical, but just to be fair. I don't think this is from me...
I don't see enough value in this relative to the challenge of implementing it.
It probably makes the most sense to stick with the normal way of thinking of the population's name as being the name of the object. As shown by @JanezJ2 above, you can access this name within a function call.
I am working on a simulation where storing a population name would come very handy. This made me think that in fact this would likely be useful in other places as well. Any pros or cons on adding a slot
name
to the population class? It could be empty most of the time.