# median_quart: Compute median and quartiles and put together. In wrappedtools: Useful Wrappers Around Commonly Used Functions

## Description

Compute median and quartiles and put together.

## Usage

 ``` 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15``` ```median_quart( x, nround = NULL, probs = c(0.25, 0.5, 0.75), qtype = 8, roundDig = 2, drop0 = FALSE, groupvar = NULL, range = FALSE, rangesep = " ", rangearrow = " -> ", prettynum = FALSE, .german = FALSE, add_n = FALSE ) ```

## Arguments

 `x` Data for computation. `nround` Number of digits for fixed round. `probs` Quantiles to compute. `qtype` Type of quantiles. `roundDig` Number of relevant digits for roundR. `drop0` Should trailing zeros be dropped? `groupvar` Optional grouping variable for subgroups. `range` Should min and max be included in output? `rangesep` How should min/max be separated from mean+-sd? `rangearrow` What is put between min -> max? `prettynum` logical, apply prettyNum to results? `.german` logical, should "." and "," be used as bigmark and decimal? `add_n` Should n be included in output?

## Value

character vector with median `[1stQuartile/3rdQuartile]`, rounded to desired precision

## Examples

 ```1 2 3 4 5 6``` ```# basic usage of median_quart median_quart(x = mtcars\$wt) # with additional options median_quart(x = mtcars\$wt, groupvar = mtcars\$am, add_n = TRUE) data(faketrial) median_quart(x=faketrial\$`Biomarker 1 [units]`,groupvar = faketrial\$Treatment) ```

wrappedtools documentation built on Sept. 6, 2021, 5:08 p.m.