Function ingests pre-calculated statistics and returns the identical results, but in an ARD format.
ard_identity(x, variable, context = "identity")(named list/data.frame)
named list of results or a data frame.
Names are the statistic names, and the values
are the statistic values. These comprise the "stat_name" and "stat"
columns in the returned ARD.
(string)
string of a variable name that is assigned to the "variable" column in the
ARD.
(string)
string to be added to the "context" column. Default is "identity".
a ARD
t.test(formula = AGE ~ 1, data = ADSL)[c("statistic", "parameter", "p.value")] |>
ard_identity(variable = "AGE", context = "onesample_t_test")
#> # An ARD data frame: 3 × 8
#> variable context stat_name stat_label stat fmt_fun warning error
#> <chr> <chr> <chr> <chr> <list> <list> <list> <list>
#> 1 AGE onesample_t_te… statistic statistic 1.45e+ 2 1 <NULL> <NULL>
#> 2 AGE onesample_t_te… parameter parameter 2.53e+ 2 1 <NULL> <NULL>
#> 3 AGE onesample_t_te… p.value p.value 1.33e-245 1 <NULL> <NULL>