Learn R Programming

mosaic (version 0.5-1)

SD: Compute standard deviation

Description

This computes the standard deviation as the square root of variance to avoid direct use of sd.

Usage

SD(x, ...)

Arguments

x
a vector or formula
...
additional arguments passed to var.

Value

  • a numeric containing the standard deviaiton

See Also

sd

Examples

Run this code
x <- rnorm(10)
SD(x)
sd(x)
summary(age ~ substance, data=HELPrct, fun=SD)

Run the code above in your browser using DataLab