Skip to content

Commit

Permalink
plot.parameters_simulate formatting VS parameters_model formatting
Browse files Browse the repository at this point in the history
Fixes #278
  • Loading branch information
strengejacke committed Sep 29, 2024
1 parent c89dcb1 commit c404e43
Showing 1 changed file with 6 additions and 1 deletion.
7 changes: 6 additions & 1 deletion R/plot.parameters_simulate.R
Original file line number Diff line number Diff line change
Expand Up @@ -50,6 +50,9 @@ data_plot.parameters_simulate <- function(x,
out$Component[grepl(paste0(i, "$"), out$Parameter)] <- i
out$Parameter <- gsub(paste0(i, "$"), "", out$Parameter)
}
} else if ("Response" %in% colnames(x)) {
out$Component <- rep(x$Response, each = nrow(out) / nrow(x))
out$Parameter <- rep(x$Parameter, each = nrow(out) / nrow(x))
}

out
Expand Down Expand Up @@ -93,7 +96,9 @@ plot.see_parameters_simulate <- function(x,
ci = 0.95,
...) {
is_mlm <- !is.null(attributes(x)$object_class) && "mlm" %in% attributes(x)$object_class
if (is.null(n_columns) && isTRUE(is_mlm)) n_columns <- 1
if (is.null(n_columns) && (isTRUE(is_mlm) || "Response" %in% colnames(x))) {
n_columns <- 1
}

# check for defaults
if (missing(centrality) && !is.null(attributes(x)$centrality)) {
Expand Down

0 comments on commit c404e43

Please sign in to comment.