1
0
mirror of https://github.com/msberends/AMR.git synced 2025-07-08 09:11:51 +02:00

(v1.7.1.9060) bugfix set_ab_names

This commit is contained in:
2021-12-05 23:11:10 +01:00
parent b747036deb
commit 75965124ef
9 changed files with 19 additions and 15 deletions

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,

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

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]
}