From 99896d05cd7abd153e798b97b795c452656609f4 Mon Sep 17 00:00:00 2001 From: Manuel Arnold Date: Tue, 1 Sep 2020 16:50:17 +0200 Subject: [PATCH] fixed typos in sctest_info --- R/sctest_info.R | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/R/sctest_info.R b/R/sctest_info.R index d08115a..22650c6 100644 --- a/R/sctest_info.R +++ b/R/sctest_info.R @@ -1,7 +1,7 @@ sctest_info <- function(CSP, covariate, test, scaled_split, from, to) { # Continuous covariate if (test == "dm") { - CSP <- CSP[-1, drop = FALSE] + CSP <- CSP[-1, , drop = FALSE] abs_CSP <- abs(x = CSP) contrib <- apply(X = abs_CSP, MARGIN = 2, FUN = max) if (scaled_split) { @@ -16,7 +16,7 @@ sctest_info <- function(CSP, covariate, test, scaled_split, from, to) { } if (test == "cvm") { - CSP <- CSP[-1, drop = FALSE] + CSP <- CSP[-1, , drop = FALSE] CSP2 <- CSP^2 contrib <- apply(X = CSP, MARGIN = 2, FUN = mean) if (scaled_split) { @@ -61,7 +61,7 @@ sctest_info <- function(CSP, covariate, test, scaled_split, from, to) { # Ordinal covariate if (test == "wdmo") { covariate <- droplevels(covariate) - CSP <- CSP[-1, drop = FALSE] + CSP <- CSP[-1, , drop = FALSE] freq <- prop.table(table(covariate)) freq <- freq / sum(freq) ncat <- length(freq) @@ -82,7 +82,7 @@ sctest_info <- function(CSP, covariate, test, scaled_split, from, to) { if (test == "maxlmo") { covariate <- droplevels(covariate) - CSP <- CSP[-1, drop = FALSE] + CSP <- CSP[-1, , drop = FALSE] freq <- prop.table(table(covariate)) freq <- freq / sum(freq) ncat <- length(freq)