Skip to content

Commit

Permalink
revise plotmodel for multi group
Browse files Browse the repository at this point in the history
  • Loading branch information
FloSchuberth committed Feb 6, 2025
1 parent 0387066 commit 53d4180
Showing 1 changed file with 11 additions and 0 deletions.
11 changes: 11 additions & 0 deletions R/postestimate_plotModel.R
Original file line number Diff line number Diff line change
Expand Up @@ -99,6 +99,17 @@ plotModel.cSEMResults_multi <- function(
.plot_structural_model_only = args_default()$.plot_structural_model_only,
.graph_attrs = args_default()$.graph_attrs
) {
plots <- Map(function(group_name, group_object) {
group_title <- if (.title == "") paste0("Group_", group_name) else paste0(.title, " Group_", group_name)
plotModel(group_object,
.title = group_title,
.plot_significances = .plot_significances,
.plot_indicator_correlations = .plot_indicator_correlations,
.plot_structural_model_only = .plot_structural_model_only,
.graph_attrs = .graph_attrs)
}, names(.object), .object)
class(plots) <- c("cSEMPlot_multi", class(plots))
return(plots)

if(inherits(.object, "cSEMResults_2ndorder")) {
lapply(.object, plotModel.cSEMResults_2ndorder,
Expand Down

0 comments on commit 53d4180

Please sign in to comment.