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.1+/-1.4    
#> 2 B         0.1+/-1.2     
summary_numeric(x, digits = 2, width = 5)
#> # A tibble: 2 × 2
#>   Variables `Median+/-IQR`  
#>   <chr>     <chr>           
#> 1 A         "-0.07\n+/-1.43"
#> 2 B         "0.07\n+/-1.2"