Changes to accomodate variable layer numbers

This commit is contained in:
2019-07-03 16:34:57 +01:00
parent 2a8887d4b9
commit aa72fff502
6 changed files with 4 additions and 6 deletions

10
app.R
View File

@@ -337,8 +337,8 @@ server <- function(input, output, session) {
means <- apply(sampleDists, 2, mean)
stdDev <- apply(sampleDists, 2, sd)
#quantiles <- t(apply(sampleDists, 2, quantile, c(0.01, 0.25, 0.5, 0.75, 0.99)))
quantiles <- t(apply(sampleDists, 2, quantile, c(0.01, 0.25, 0.5, 0.75, 0.99)))
print(paste("Building likelihoods from model, sample dists", length(thisModel$p_es$nodes$name), length(sampleDists)))
#str(quantiles)
@@ -570,18 +570,16 @@ server <- function(input, output, session) {
} else {
edgeNet <- edges
}
print(paste(nrow(model$legend), length(palette)))
legendDF <- data.frame(
id = 1:nrow(model$legend),
label = model$legend,
color = palette,
color = palette[1:nrow(model$legend)],
stringsAsFactors = FALSE
)
visNetwork(nodeNet, edgeNet, width = "100%", main = "Bayesian Belief Network", submain = input$modelSelect) %>%
visExport() %>%
visLegend(useGroups = FALSE, addNodes = legendDF) %>%