Closed elbersb closed 3 years ago
Yes I like this better! I had a version of this in draft that hadn't quite made it in to the book, so a PR is excellent. Regarding implementation in your package - I think it works either way, though I agree that it may make sense for it to work the same way as your other functions like dissimilarity()
do.
In light of https://github.com/elbersb/segregation/issues/8, this change uses
group_modify()
also for the entropy calculation. Or maybeentropy
should also return a data frame? It would be more consistent with the overall design of the package. Would be interested in hearing what you think!