From 3dcf4f500df21b51e48aac3824e9e13b599c3ceb Mon Sep 17 00:00:00 2001 From: Shun Wang Date: Fri, 1 Dec 2023 16:40:52 +0800 Subject: [PATCH] Fix baiyesian AB test failing with NA values (#178) * remove na value in dataset * excluse.na.listwise -> exclude.na.listwise --- R/abtestbayesian.R | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/R/abtestbayesian.R b/R/abtestbayesian.R index 8889765c..a6c40ed2 100644 --- a/R/abtestbayesian.R +++ b/R/abtestbayesian.R @@ -68,15 +68,15 @@ ABTestBayesianInternal <- function(jaspResults, dataset = NULL, options) { # The (numeric) columns given as dependent/covariates/wlsWeights if (!is.null(dataset)) - return(dataset) + return (dataset) asNum <- c(options$n1, options$y1, options$n2, options$y2) - dataset <- .readDataSetToEnd(columns.as.numeric = asNum, excluse.na.listwise = asNum) + dataset <- .readDataSetToEnd(columns.as.numeric = asNum, exclude.na.listwise = asNum) new_names <- setNames(c("n1", "n2", "y1", "y2"), - c(.v(options$n1), .v(options$n2), .v(options$y1), .v(options$y2))) + c(options$n1, options$n2, options$y1, options$y2)) colnames(dataset) <- stringr::str_replace_all(colnames(dataset), new_names) - return(dataset) + return (dataset) }