Skip to content

Commit

Permalink
revert to tally; bump version
Browse files Browse the repository at this point in the history
a bug in dplyr was fixed:
<tidyverse/dplyr#5199>
  • Loading branch information
zkamvar committed May 8, 2020
1 parent 9c2b9bd commit 84d9152
Show file tree
Hide file tree
Showing 3 changed files with 10 additions and 2 deletions.
2 changes: 1 addition & 1 deletion DESCRIPTION
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
Package: apyramid
Title: Visualize Population Pyramids Aggregated by Age
Version: 0.1.1
Version: 0.1.2
Authors@R: c(
person(given = "Zhian N.",
family = "Kamvar",
Expand Down
8 changes: 8 additions & 0 deletions NEWS.md
Original file line number Diff line number Diff line change
@@ -1,3 +1,11 @@
# apyramid 0.1.2

CRAN MAINTENANCE
----------------

* This version has no user-visible changes and fixes a couple of changed
behaviors that arose because of dplyr version 1.0.0. (#6, #7, @zkamvar).

# apyramid 0.1.1

CRAN MAINTENANCE
Expand Down
2 changes: 1 addition & 1 deletion R/age-pyramid.R
Original file line number Diff line number Diff line change
Expand Up @@ -212,7 +212,7 @@ age_pyramid <- function(data, age_group = "age_group", split_by = "sex",
}

# find the maximum x axis position
maxdata <- dplyr::summarize(maxdata, n := sum(!!quote(n)))
maxdata <- dplyr::tally(maxdata, wt = !!quote(n), name = "n")
max_n <- max(abs(maxdata[["n"]]), na.rm = TRUE)

if (proportional) {
Expand Down

0 comments on commit 84d9152

Please sign in to comment.