Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

address breaking change in dplyr::last() #491

Merged
merged 1 commit into from
Oct 21, 2022
Merged

address breaking change in dplyr::last() #491

merged 1 commit into from
Oct 21, 2022

Conversation

sfirke
Copy link
Owner

@sfirke sfirke commented Oct 21, 2022

Description

Fix #490

@codecov
Copy link

codecov bot commented Oct 21, 2022

Codecov Report

Merging #491 (7b28a43) into main (469ecfe) will not change coverage.
The diff coverage is 100.00%.

Impacted file tree graph

@@            Coverage Diff            @@
##              main      #491   +/-   ##
=========================================
  Coverage   100.00%   100.00%           
=========================================
  Files           23        23           
  Lines         1088      1088           
=========================================
  Hits          1088      1088           
Impacted Files Coverage Δ
R/adorn_percentages.R 100.00% <100.00%> (ø)

@lionel-
Copy link
Contributor

lionel- commented Dec 12, 2022

Thanks for this! We plan to release dplyr 1.1.0 on January 27. A pre-emptive fix release of janitor would be helpful.

@@ -91,9 +91,9 @@ adorn_percentages <- function(dat, denominator = "row", na.rm = TRUE, ...) {
if ("col" %in% attr(dat, "totals") & !explicitly_exempt_totals) {
cols_to_tally <- c(cols_to_tally, ncol(dat))
if ("row" %in% attr(dat, "totals")) {
col_sum <- c(col_sum, sum(dplyr::last(dat)[-nrow(dat)]))
col_sum <- c(col_sum, sum(dat[-nrow(dat), ncol(dat)]))
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Just FYI, another way to extract the last column with dplyr is dplyr::pull(dat).

@sfirke
Copy link
Owner Author

sfirke commented Dec 13, 2022

Thanks for this! We plan to release dplyr 1.1.0 on January 27. A pre-emptive fix release of janitor would be helpful.

That's the date for submission to CRAN? I appreciate the advance notice, we will plan to submit the next version of janitor to CRAN prior to that.

@lionel-
Copy link
Contributor

lionel- commented Dec 13, 2022

That's the date for submission to CRAN?

yup it is

we will plan to submit the next version of janitor to CRAN prior to that.

Thanks!

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.

bug in adorn_percentages(denominator = "col")
2 participants