camr_descriptive_summary | R Documentation |
Function to generate descriptive summaries
(means, percentages, ranges, etc.) of a
variable that can then be passed to the
descriptive_summary
argument of the
new_codebook_entry function.
camr_descriptive_summary(x, type, missing_values = NULL, digits = 2)
x |
A variable. |
type |
The type of summary to return,
either |
missing_values |
An optional logical
vector matching in length to |
digits |
The number of digits to round to. |
A list with two vectors: content
with the summary statistics and additional_content
with the labels for each type of statistic.
Kevin Potter
data( example_CAM_data_set )
example_CAM_data_set$INV.INT.HADS_anxiety |>
camr_descriptive_summary( "continuous") |>
data.frame()
example_CAM_data_set$SBJ.INT.Biological_sex |>
camr_descriptive_summary( "categorical") |>
data.frame()
example_CAM_data_set$SSS.DAT.Date_of_visit |>
camr_descriptive_summary( "range") |>
data.frame()
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.