Skip to contents

Formats the output of print_numeric into a concise summary.

Usage

summary_numeric(x, ...)

Arguments

x

Data frame, matrix, or vector containing numerical variables.

...

Additional arguments passed to print_numeric.

Value

A tibble with one row per numeric variable and the following columns:

Variables

Character specifying the variable name.

Median+/-IQR

Character specifying the median and interquartile range.

Examples

x <- data.frame(A = rnorm(100), B = rnorm(100))
summary_numeric(x)
#> # A tibble: 2 × 2
#>   Variables `Median+/-IQR`
#>   <chr>     <chr>         
#> 1 A         -0.2+/-1.2    
#> 2 B         -0.2+/-1.4    
summary_numeric(x, digits = 2, width = 5)
#> # A tibble: 2 × 2
#>   Variables `Median+/-IQR`  
#>   <chr>     <chr>           
#> 1 A         "-0.18\n+/-1.16"
#> 2 B         "-0.22\n+/-1.44"