(v1.3.0.9022) mo_matching_score(), poorman update, as.rsi() fix

This commit is contained in:
dr. M.S. (Matthijs) Berends committed 2020-09-18 16:05:53 +02:00
1 parent 89401ede9f
commit 4e40e42011
138 files changed
+2923 -1472

No files matched your search

+2 -2
View File
@@ -78,7 +78,7 @@ pca <- function(x,
error = function(e) stop(e$message, call. = FALSE))
if (length(new_list[[i]]) == 1) {
if (is.character(new_list[[i]]) & new_list[[i]] %in% colnames(x)) {
# this is to support quoted variables: df %>% pca("mycol1", "mycol2")
# this is to support quoted variables: df %pm>% pca("mycol1", "mycol2")
new_list[[i]] <- x[, new_list[[i]]]
} else {
# remove item - it's a parameter like `center`
@@ -102,7 +102,7 @@ pca <- function(x,
x <- cbind(x.bak[, sapply(x.bak, function(y) !is.numeric(y) & !all(is.na(y))), drop = FALSE], x)
}
x <- ungroup(x) # would otherwise select the grouping vars
x <- pm_ungroup(x) # would otherwise select the grouping vars
x <- x[rowSums(is.na(x)) == 0, ] # remove columns containing NAs
pca_data <- x[, which(sapply(x, function(x) is.numeric(x)))]