ff_mediqr: Parse a binary variable as 'median' and 'interquartile range'

Description Usage Arguments Examples

Description

Return a list that summarises the median and IQR, or mean and SD

Usage

1
ff_mediqr(var, data = dt, dp = 0)

Arguments

var

a numerical variable

data

a data frame (or data.table)

dp

number of decimal places in formatted response

Examples

1
2
3
4
5
6
7
# Create data.frame and summarise proportion of A's and B's
set.seed(1)
dt <- data.frame(choice=sample(c("A", "B"), 100, replace=TRUE), x=rnorm(100))
head(dt)
ff_mediqr(x, data=dt, dp=1)
dd <- data.table(x=rnorm(100,42,6))
ff_msd(x, dd)

datascibc/dsbc documentation built on May 14, 2019, 7:45 p.m.