mirror of
https://github.com/msberends/AMR.git
synced 2025-07-09 02:03:04 +02:00
(v1.4.0.9016) as.rsi() older R versions
This commit is contained in:
@ -313,7 +313,9 @@ word_wrap <- function(...,
|
||||
}
|
||||
msg <- gsub("\n", paste0("\n", strrep(" ", indentation)), msg, fixed = TRUE)
|
||||
msg <- gsub("*|*", paste0("*|*", strrep(" ", indentation)), msg, fixed = TRUE)
|
||||
|
||||
# remove trailing empty characters
|
||||
msg <- gsub("(\n| )+$", "", msg)
|
||||
|
||||
if (length(add_fn) > 0) {
|
||||
if (!is.list(add_fn)) {
|
||||
add_fn <- list(add_fn)
|
||||
|
7
R/rsi.R
7
R/rsi.R
@ -469,6 +469,13 @@ as.rsi.data.frame <- function(x,
|
||||
meet_criteria(conserve_capped_values, allow_class = "logical", has_length = 1)
|
||||
meet_criteria(add_intrinsic_resistance, allow_class = "logical", has_length = 1)
|
||||
|
||||
for (i in seq_len(ncol(x))) {
|
||||
# don't keep factors
|
||||
if (is.factor(x[, i, drop = TRUE])) {
|
||||
x[, i] <- as.character(x[, i, drop = TRUE])
|
||||
}
|
||||
}
|
||||
|
||||
# -- MO
|
||||
col_mo.bak <- col_mo
|
||||
if (is.null(col_mo)) {
|
||||
|
Reference in New Issue
Block a user