Skip to content

Commit

Permalink
Fix for compare_parameters(effects = "random")
Browse files Browse the repository at this point in the history
  • Loading branch information
strengejacke committed Apr 4, 2024
1 parent 6782928 commit 2456d1b
Showing 1 changed file with 12 additions and 7 deletions.
19 changes: 12 additions & 7 deletions R/plot.compare_parameters.R
Original file line number Diff line number Diff line change
Expand Up @@ -210,14 +210,19 @@ data_plot.see_compare_parameters <- function(x, ...) {
values_to = "CI_high",
columns = colnames(x)[col_ci_high]
)["CI_high"]
dataplot <- cbind(out1, out2, out3)

Check warning on line 213 in R/plot.compare_parameters.R

View check run for this annotation

Codecov / codecov/patch

R/plot.compare_parameters.R#L213

Added line #L213 was not covered by tests

# if we have effects = "random", we probably don't have p-values. so
# check if this column exists, and if not, we skip it...
if (length(col_p) != 0) {
out4 <- .reshape_to_long(
x,
values_to = "p",
columns = colnames(x)[col_p]
)["p"]
dataplot <- cbind(dataplot, out4)

Check warning on line 223 in R/plot.compare_parameters.R

View check run for this annotation

Codecov / codecov/patch

R/plot.compare_parameters.R#L217-L223

Added lines #L217 - L223 were not covered by tests
}

out4 <- .reshape_to_long(
x,
values_to = "p",
columns = colnames(x)[col_p]
)["p"]

dataplot <- cbind(out1, out2, out3, out4)
dataplot$group <- gsub("(.*)\\.(.*)", "\\2", dataplot$group)

rownames(dataplot) <- NULL
Expand Down

0 comments on commit 2456d1b

Please sign in to comment.