Learn R Programming

JWileymisc (version 1.4.1)

formatMedIQR: Function to format the median and IQR of a variable

Description

Function to format the median and IQR of a variable

Usage

formatMedIQR(x, d = 2, na.rm = TRUE)

Value

A character string with results

Arguments

x

the data to have the median and IQR calculated

d

How many digits to display. Defaults to 2.

na.rm

Logical whether to remove missing values. Defaults to TRUE.

Examples

Run this code
formatMedIQR(mtcars$mpg)

Run the code above in your browser using DataLab