Skip to content

Commit

Permalink
fixes error in plot titles
Browse files Browse the repository at this point in the history
  • Loading branch information
Craig Parylo authored and Craig Parylo committed Jun 7, 2024
1 parent f5937a5 commit 034e759
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion R/plot_or.R
Original file line number Diff line number Diff line change
Expand Up @@ -196,7 +196,7 @@ prepare_df_for_plotting <- function(df) {
plot_odds_ratio <- function(df, model) {

# get the name of the outcome variable - will be used in the plot title
model_outcome_var = model$formula[[2]]
model_outcome_var = model$formula[[2]] |> as.character()
model_outcome_label = sapply(model$data[model_outcome_var], function(x){attr(x,"label")})[[1]]
model_outcome = coalesce(model_outcome_label, model_outcome_var |> as.character())

Expand Down

0 comments on commit 034e759

Please sign in to comment.