Skip to content

Conversation

UchidaMizuki
Copy link
Contributor

Fix #2207.

Probably not the best way, but I update summarise.sf() to allow for .by arguments.
The solution here is to store the row IDs of the original data in the .rows column by dplyr::summarise().

The disadvantage of this solution is that a column named .rows will be overwritten if the user has used it.
However, the column name .rows is not generally used,
since it cannot be used in tibble::tibble() and as a grouping variable for dplyr::group_by() .

I also noticed that summarise.sf() has an argument of .dots, probably past dplyr.
Now I have left it as is, but should I change the documentation as well?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Unexpected summarise() interaction with sf objects
1 participant