Learn R Programming

cards (version 0.6.1)

ard_identity: ARD Identity

Description

Function ingests pre-calculated statistics and returns the identical results, but in an ARD format.

Usage

ard_identity(x, variable, context = "identity")

Value

a ARD

Arguments

x

(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.

variable

(string)
string of a variable name that is assigned to the "variable" column in the ARD.

context

(string)
string to be added to the "context" column. Default is "identity".

Examples

Run this code
t.test(formula = AGE ~ 1, data = ADSL)[c("statistic", "parameter", "p.value")] |>
  ard_identity(variable = "AGE", context = "onesample_t_test")

Run the code above in your browser using DataLab