Skip to content

Commit

Permalink
fix
Browse files Browse the repository at this point in the history
  • Loading branch information
strengejacke committed Dec 2, 2024
1 parent 7c93746 commit 61c5b09
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 2 deletions.
6 changes: 4 additions & 2 deletions R/dominance_analysis.R
Original file line number Diff line number Diff line change
Expand Up @@ -539,9 +539,10 @@ dominance_analysis <- function(model, sets = NULL, all = NULL,
)
)

cols_to_select <- colnames(da_df_cdl)[2:length(da_df_cdl)]
da_df_cdl <- datawizard::data_rename(
da_df_cdl,
select = names(da_df_cdl)[2:length(da_df_cdl)],
select = cols_to_select,
replacement = colnames(domir_res$Conditional_Dominance)
)
} else {
Expand All @@ -559,9 +560,10 @@ dominance_analysis <- function(model, sets = NULL, all = NULL,
)
)

cols_to_select <- colnames(da_df_cpt)[2:length(da_df_cpt)]
da_df_cpt <- datawizard::data_rename(
da_df_cpt,
select = names(da_df_cpt)[2:length(da_df_cpt)],
select = cols_to_select,
replacement = colnames(domir_res$Complete_Dominance)
)
} else {
Expand Down
1 change: 1 addition & 0 deletions tests/testthat/test-dominance_analysis.R
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
skip_if_not_installed("performance")
skip_if_not_installed("domir")
skip_if_not_installed("datawizard")

DA_test_model <- lm(mpg ~ vs + cyl + carb, data = mtcars)

Expand Down

0 comments on commit 61c5b09

Please sign in to comment.