mirror of https://github.com/msberends/AMR.git
fix for group selections
This commit is contained in:
parent
ef716f6ee3
commit
a82552dd88
|
@ -1,5 +1,5 @@
|
|||
Package: AMR
|
||||
Version: 1.8.2.9129
|
||||
Version: 1.8.2.9130
|
||||
Date: 2023-02-15
|
||||
Title: Antimicrobial Resistance Data Analysis
|
||||
Description: Functions to simplify and standardise antimicrobial resistance (AMR)
|
||||
|
|
2
NEWS.md
2
NEWS.md
|
@ -1,4 +1,4 @@
|
|||
# AMR 1.8.2.9129
|
||||
# AMR 1.8.2.9130
|
||||
|
||||
*(this beta version will eventually become v2.0! We're happy to reach a new major milestone soon!)*
|
||||
|
||||
|
|
|
@ -900,11 +900,13 @@ get_current_data <- function(arg_name, call) {
|
|||
# e.g. for `example_isolates %>% group_by(ward) %>% mutate(first = first_isolate(.))`
|
||||
if (valid_df(env$data)) {
|
||||
# support for dplyr 1.1.x
|
||||
return(env$data[env$mask$current_rows(), , drop = FALSE])
|
||||
df <- env$data
|
||||
} else {
|
||||
# support for dplyr 1.0.x
|
||||
return(env$`.data`[env$mask$current_rows(), , drop = FALSE])
|
||||
df <- env$`.data`
|
||||
}
|
||||
rows <- tryCatch(env$mask$current_rows(), error = function(e) seq_len(NROW(df)))
|
||||
return(df[rows, , drop = FALSE])
|
||||
|
||||
# base R support ----
|
||||
} else if (!is.null(env$`.Generic`)) {
|
||||
|
|
Loading…
Reference in New Issue