Skip to content

Commit

Permalink
update data_rename-args
Browse files Browse the repository at this point in the history
  • Loading branch information
strengejacke committed Dec 3, 2024
1 parent c2d649e commit 68058f5
Show file tree
Hide file tree
Showing 4 changed files with 7 additions and 7 deletions.
4 changes: 2 additions & 2 deletions R/report_htest_chi2.R
Original file line number Diff line number Diff line change
Expand Up @@ -47,8 +47,8 @@

table <- datawizard::data_rename(
as.data.frame(table),
c("CI_low", "CI_high"),
paste0(estimate, c("_CI_low", "_CI_high"))
select = c("CI_low", "CI_high"),
replacement = paste0(estimate, c("_CI_low", "_CI_high"))
)

table <- table[c(estimate, paste0(estimate, c("_CI_low", "_CI_high")))]
Expand Down
4 changes: 2 additions & 2 deletions R/report_htest_fisher.R
Original file line number Diff line number Diff line change
Expand Up @@ -40,8 +40,8 @@

table <- datawizard::data_rename(
as.data.frame(table),
c("CI_low", "CI_high"),
paste0(estimate, c("_CI_low", "_CI_high"))
select = c("CI_low", "CI_high"),
replacement = paste0(estimate, c("_CI_low", "_CI_high"))
)

table <- table[c(estimate, paste0(estimate, c("_CI_low", "_CI_high")))]
Expand Down
4 changes: 2 additions & 2 deletions R/report_htest_ttest.R
Original file line number Diff line number Diff line change
Expand Up @@ -70,8 +70,8 @@

table <- datawizard::data_rename(
as.data.frame(table),
c("CI_low", "CI_high"),
paste0(estimate, c("_CI_low", "_CI_high"))
select = c("CI_low", "CI_high"),
replacement = paste0(estimate, c("_CI_low", "_CI_high"))
)

table <- table[c(estimate, paste0(estimate, c("_CI_low", "_CI_high")))]
Expand Down
2 changes: 1 addition & 1 deletion R/report_sample.R
Original file line number Diff line number Diff line change
Expand Up @@ -187,7 +187,7 @@ report_sample <- function(data,
new_column = ".new_names",
separator = ", "
)[[".new_names"]]
result <- datawizard::data_rename(result, pattern = old_names, replacement = new_names)
result <- datawizard::data_rename(result, select = old_names, replacement = new_names)
}
# remember values of first columns
variable <- result[[1]]["Variable"]
Expand Down

0 comments on commit 68058f5

Please sign in to comment.