From 4aa8e3e19ea52984d2dd378d713975c092077bcd Mon Sep 17 00:00:00 2001 From: Jason Thomas Date: Fri, 18 Nov 2022 12:49:12 -0500 Subject: [PATCH 1/2] Update insilico_core.r fixing a few typos in warning & error messages and in parameter name for removeExtV5 function (nagete -> negate) --- InSilicoVA/R/insilico_core.r | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/InSilicoVA/R/insilico_core.r b/InSilicoVA/R/insilico_core.r index f6d16c7..ed95cdf 100644 --- a/InSilicoVA/R/insilico_core.r +++ b/InSilicoVA/R/insilico_core.r @@ -75,7 +75,7 @@ insilico.fit <- function(data, data.type = c("WHO2012", "WHO2016")[1], sci = NUL data.type <- toupper(data.type) if(!datacheck && data.type == "WHO2016"){ - warning("Data check is turned off. Please be very careful with this, because some indicators needs to be negated in the data check steps (i.e., having symptom = Yes turned into not having symptom = No). Failed to properly negate all such symptoms will lead to erroneous inference.") + warning("Data check is turned off. Please be very careful with this, because some indicators needs to be negated in the data check steps (i.e., having symptom = Yes turned into not having symptom = No). Failure to properly negate all such symptoms will lead to erroneous inference.") } ## Add java system check @@ -541,7 +541,7 @@ removeExt <- function(data, prob.orig, is.Numeric, subpop, subpop_order_list, ex ext.csmf = ext.csmf)) } -removeExtV5 <- function(data, prob.orig, csmf.orig, is.Numeric, subpop, subpop_order_list, external.causes, external.symps, nagete){ +removeExtV5 <- function(data, prob.orig, csmf.orig, is.Numeric, subpop, subpop_order_list, external.causes, external.symps, negate){ ########################################################### # function to remove external causes/symps and assign deterministic deaths # @param: @@ -904,14 +904,14 @@ ParseResult <- function(N_sub.j, C.j, S.j, N_level.j, pool.j, fit){ count.changelabel = 0 for(i in 1:length(valabels)){ if(tolower(colnames(data)[i]) != tolower(valabels)[i]){ - warning(paste("Input columne '", colnames(data)[i], "' does not match InterVA standard: '", + warning(paste("Input column '", colnames(data)[i], "' does not match InterVA standard: '", valabels[i], "'", sep = ""), call. = FALSE, immediate. = TRUE) count.changelabel = count.changelabel + 1 } } if(count.changelabel > 0){ - warning(paste(count.changelabel, "column names changed in input. \n If the change in undesirable, please change in the input to match standard InterVA4 input format.\n"), call. = FALSE, immediate. = TRUE) + warning(paste(count.changelabel, "column names changed in input. \n If the change is undesirable, please change the input to match standard InterVA4 input format.\n"), call. = FALSE, immediate. = TRUE) colnames(data) <- valabels } @@ -1808,4 +1808,4 @@ return(out) #' @keywords internal java_message <- function(){ message("\nIf you receive Java heap space error, try re-starting R and run this line, *before* loading any libraries:\n options(java.parameters = c('-Xmx2g'))\nThis line allocates 2GB of memory to Java. You can change the memory size by modifying the parameter '-Xmx2g'.") -} \ No newline at end of file +} From 9bf7597dce812bdf7edfc3faf8f518c0e3976aa8 Mon Sep 17 00:00:00 2001 From: Jason Thomas Date: Fri, 18 Nov 2022 12:59:16 -0500 Subject: [PATCH 2/2] Update insilico_core.r Made CondProbNum -> CondProb change --- InSilicoVA/R/insilico_core.r | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/InSilicoVA/R/insilico_core.r b/InSilicoVA/R/insilico_core.r index ed95cdf..569b8e4 100644 --- a/InSilicoVA/R/insilico_core.r +++ b/InSilicoVA/R/insilico_core.r @@ -918,8 +918,8 @@ ParseResult <- function(N_sub.j, C.j, S.j, N_level.j, pool.j, fit){ if(!is.null(CondProb)){ prob.orig <- CondProb exclude.impossible.cause <- "none" - vacauses <- colnames(CondProbNum) - if(is.null(vacauses)) vacauses <- paste0("Cause", 1:dim(CondProbNum)[2]) + vacauses <- colnames(CondProb) + if(is.null(vacauses)) vacauses <- paste0("Cause", 1:dim(CondProb)[2]) } if(!is.null(CondProbNum)){ prob.orig <- CondProbNum