Open fdetsch opened 3 years ago
I've looked into this a little bit and I fixed the problems with group_by()
(locally, not yet pushed). However the way that this works for {dplyr} is they provide a way for package authors to create methods for their S3 generics (see here). Therefore when you run regions %>% group_by(NAME_1)
, the output class is [1] "sf" "grouped_df" "tbl_df" "tbl" "data.frame"
. Hence when you call summarise()
on this output, it dispatches to summarise.sf()
which uses some of {dplyr}'s functionality so unfortunately, without buy-in from package authors, you will never really be able to use {sf} with {poorman} unless I were to implement these methods myself.
Not sure whether this goes way beyond the scope of the poorman, but would basic dissolve functionality for sf objects - as offered by dplyr - be something you might want to think about for a future release? A quick example of what I mean can be found here.
Here's the condensed dplyr approach from above link:
The poorman currently fails to carry out the
group_by()
operation with an