Skip to content

Commit

Permalink
Fix duplicate row removal on usmap_transform, fixes #32
Browse files Browse the repository at this point in the history
  • Loading branch information
pdil committed Oct 1, 2020
1 parent 3284cff commit 5d92796
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 1 deletion.
1 change: 1 addition & 0 deletions NEWS.md
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,7 @@
* Lightweight landing page containing useful information, links, and examples of usmap usage.
* `state` can now be omitted when using `fips()`. In this case, all available FIPS codes are returned, sorted by state abbreviation, see [Issue #28](https://github.com/pdil/usmap/issues/28).
* `fips` can now be omitted when using `fips_info()`. In this case, all available states are returned, sorted by state abbreviation, see [Issue #28](https://github.com/pdil/usmap/issues/28).
* Fix duplicate coordinates from being removed during `usmap_transform` (if value columns differ), see [Issue #32](https://github.com/pdil/usmap/issues/32).
* Prevent [warnings introduced by `ggplot2` v3.3.0](https://github.com/tidyverse/ggplot2/pull/3346), see [Issue #35](https://github.com/pdil/usmap/issues/35).

# usmap 0.5.0
Expand Down
2 changes: 1 addition & 1 deletion R/transform.R
Original file line number Diff line number Diff line change
Expand Up @@ -156,7 +156,7 @@ usmap_transform.data.frame <- function(data) {
}

result <- as.data.frame(
combined[!duplicated(combined@data[, c(1, 2)], fromLast = TRUE), ]
combined[!duplicated(combined@data, fromLast = TRUE), ]
)
row.names(result) <- NULL

Expand Down

0 comments on commit 5d92796

Please sign in to comment.