Skip to content

Commit

Permalink
fixing #381 (#382)
Browse files Browse the repository at this point in the history
  • Loading branch information
osorensen authored Feb 16, 2024
1 parent a80b0d6 commit 2fe90c2
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions R/heat_plot.R
Original file line number Diff line number Diff line change
Expand Up @@ -36,14 +36,14 @@ heat_plot <- function(model_fit, burnin = model_fit$burnin, ...) {
drop = FALSE
]
posterior_ranks$probability <- 1
posterior_ranks$iteration <- NULL

heatplot_data <- aggregate(posterior_ranks[, "probability", drop = FALSE],
by = list(
cluster = posterior_ranks$cluster,
item = posterior_ranks$item,
value = posterior_ranks$value
),
FUN = function(x) sum(x) / (model_fit$nmc - burnin)
FUN = function(x) sum(x) / length(unique(posterior_ranks$iteration))
)

heatplot_data$item <- factor(heatplot_data$item, levels = item_order)
Expand Down

0 comments on commit 2fe90c2

Please sign in to comment.