Learn R Programming

MSMU (version 0.1.2)

spread_stats: Summary of Spread Statistics

Description

Computes a variety of spread statistics for a numeric vector, including: standard deviation, iqr, the normalized minimum, maximum, and range as well as the percentage of data within 1, 2, and 3 standard deviations (via pct())

Usage

spread_stats(x)

Value

sd

Standard Deviation

iqr

Inter Quartile Range

minz

Normalized Minimum

maxz

Normalized Maximum

diffz

Normalized Range

pct1

Percent of data within 1 standard deviation from pct()

pct2

Percent of data within 2 standard deviation from pct()

pct3

Percent of data within 3 standard deviation from pct()

Arguments

x

A numeric vector

See Also

pct

Examples

Run this code
# Spread stats of random normal data
set.seed(123)
x <- rnorm(1000)
spread_stats(x)

# Spread stats of mpg in mtcars
data("mtcars")
spread_stats(mtcars$mpg)

Run the code above in your browser using DataLab