(v1.7.1.9060) bugfix set_ab_names

This commit is contained in:
dr. M.S. (Matthijs) Berends committed 2021-12-05 23:11:10 +01:00
1 parent b747036deb
commit 75965124ef
9 files changed
+19 -15

No files matched your search

+1 -1
View File
@@ -57,7 +57,7 @@ pm_left_join <- function(x, y, by = NULL, suffix = c(".x", ".y")) {
# adapted from https://github.com/nathaneastwood/poorman/blob/52eb6947e0b4430cd588976ed8820013eddf955f/R/where.R#L17-L32
where <- function(fn) {
if (!is.function(fn)) {
stop(deparse_var(fn), " is not a valid predicate function.")
stop(pm_deparse_var(fn), " is not a valid predicate function.")
}
preds <- unlist(lapply(
pm_select_env$.data,
+1 -1
View File
@@ -354,7 +354,7 @@ set_ab_names <- function(data, ..., property = "name", language = get_locale(),
}
if (is.data.frame(data)) {
if (length(list(...)) > 0) {
if (tryCatch(length(list(...)) > 0, error = function(e) TRUE)) {
df <- pm_select(data, ...)
} else {
df <- data
+5 -1
View File
@@ -604,7 +604,11 @@ as.rsi.data.frame <- function(x,
}
i <- 0
sel <- colnames(pm_select(x, ...))
if (tryCatch(length(list(...)) > 0, error = function(e) TRUE)) {
sel <- colnames(pm_select(x, ...))
} else {
sel <- colnames(x)
}
if (!is.null(col_mo)) {
sel <- sel[sel != col_mo]
}