dot-format_ttest_results: Convert t-test to ARD

.format_ttest_resultsR Documentation

Convert t-test to ARD

Description

Convert t-test to ARD

Usage

.format_ttest_results(by = NULL, variable, lst_tidy, paired, ...)

Arguments

by

(string)
by column name

variable

(string)
variable column name

lst_tidy

(named list)
list of tidied results constructed with eval_capture_conditions(), e.g. eval_capture_conditions(t.test(mtcars$mpg ~ mtcars$am) |> broom::tidy()).

paired

a logical indicating whether you want a paired t-test.

...

passed to t.test(...)

Value

ARD data frame

Examples


cardx:::.format_ttest_results(
  by = "ARM",
  variable = "AGE",
  paired = FALSE,
  lst_tidy =
    cards::eval_capture_conditions(
      stats::t.test(ADSL[["AGE"]] ~ ADSL[["ARM"]], paired = FALSE) |>
        broom::tidy()
    )
)


cardx documentation built on Sept. 11, 2024, 9:12 p.m.