(v1.7.1.9005) ab class selectors for R-3.0 and R-3.1

This commit is contained in:
dr. M.S. (Matthijs) Berends committed 2021-06-22 12:16:42 +02:00
1 parent c44d9392ca
commit d04e83f494
41 files changed
+227 -279

No files matched your search

+2 -4
View File
@@ -747,16 +747,14 @@ mo_validate <- function(x, property, language, ...) {
find_mo_col <- function(fn) {
# this function tries to find an mo column in the data the function was called in,
# which is useful when functions are used within dplyr verbs
df <- get_current_data(arg_name = "x",
call = -3,
reuse_from_1st_call = FALSE) # will return an error if not found
df <- get_current_data(arg_name = "x", call = -3) # will return an error if not found
mo <- NULL
try({
mo <- suppressMessages(search_type_in_df(df, "mo"))
}, silent = TRUE)
if (!is.null(df) && !is.null(mo) && is.data.frame(df)) {
if (message_not_thrown_before(fn = fn)) {
message_("Using column '", font_bold(mo), "' as input for ", fn, "()")
message_("Using column '", font_bold(mo), "' as input for `", fn, "()`")
remember_thrown_message(fn = fn)
}
return(df[, mo, drop = TRUE])