Skip to content

Commit

Permalink
fix test issues (#126)
Browse files Browse the repository at this point in the history
  • Loading branch information
vandenman authored Dec 4, 2024
1 parent b3c6afc commit ca233fa
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 3 deletions.
2 changes: 1 addition & 1 deletion R/bayesiannetworkanalysis.R
Original file line number Diff line number Diff line change
Expand Up @@ -41,7 +41,7 @@ BayesianNetworkAnalysis <- function(jaspResults, dataset, options) {
mainContainer <- jaspResults[["mainContainer"]]
if (is.null(mainContainer)) {
mainContainer <- createJaspContainer(dependencies = c("variables", "groupingVariable", "estimator",
"burnin", "iter", "gprior", "dfprior"))
"burnin", "iter", "gprior", "dfprior", "setSeed", "seed"))
jaspResults[["mainContainer"]] <- mainContainer
}
.bayesianNetworkAnalysisMainTableMeta(mainContainer, dataset, options)
Expand Down
7 changes: 5 additions & 2 deletions R/networkanalysis.R
Original file line number Diff line number Diff line change
Expand Up @@ -95,8 +95,11 @@ NetworkAnalysis <- function(jaspResults, dataset, options) {

# check if data must be binarized
if (options[["estimator"]] %in% c("isingFit", "isingSampler")) {
idx <- colnames(dataset) != options[["groupingVariable"]]
dataset[idx] <- bootnet::binarize(dataset[idx], split = options[["split"]], verbose = FALSE, removeNArows = FALSE)

for (i in seq_along(dataset)) {
idx <- colnames(dataset[[i]]) != options[["groupingVariable"]]
dataset[[i]][idx] <- bootnet::binarize(dataset[[i]][idx], split = options[["split"]], verbose = FALSE, removeNArows = FALSE)
}

if (options[["estimator"]] == "isingFit") {
# required check since isingFit removes these variables from the analyses
Expand Down

0 comments on commit ca233fa

Please sign in to comment.