sample_sd: Compute the sample standard deviation

View source: R/sample_sd.R

sample_sdR Documentation

Compute the sample standard deviation

Description

sample_sd computes the sample standard deviation, i.e. the square root of the sum of squared deviations of x from the mean divided by the total number of observations. This is in contrast to sd, which computes an unbiased estimate of the standard deviation (i.e. it divides the sum of squared deviations by n - 1).

Usage

sample_sd(x, na.rm = FALSE)

Arguments

x

Numeric vector

na.rm

(logical) Should missing values be removed?

Value

A single numeric value equal to the sample variance

Examples

data(anchoring)
sample_sd(anchoring$everest_feet)

sdamr documentation built on Nov. 17, 2022, 1:06 a.m.