Skip to content

Commit

Permalink
Fix baiyesian AB test failing with NA values (#178)
Browse files Browse the repository at this point in the history
* remove na value in dataset

* excluse.na.listwise -> exclude.na.listwise
  • Loading branch information
shun2wang authored Dec 1, 2023
1 parent 79d1735 commit 3dcf4f5
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions R/abtestbayesian.R
Original file line number Diff line number Diff line change
Expand Up @@ -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)
}


Expand Down

0 comments on commit 3dcf4f5

Please sign in to comment.