R/fct_core.R
std_dev_estimate.RdGiven a data frame and the name of a column, calculates the estimate of the standard deviation using the following formulas: 1. Estimate of variance = (corrected sum of squares)/(n - 1) 2. Corrected sum of squares = sum(x^2) - (sum(x)^2)/n 3. Estimate of standard deviation = sqrt(estimate of variance)
std_dev_estimate(df, col_name)A data frame containing the column to calculate the standard deviation estimate.
A string representing the name of the column for which to calculate the estimate.
A numeric value representing the estimate of the standard deviation of the column.
data(mtcars)
std_dev_estimate <- std_dev_estimate(mtcars, "mpg")
std_dev_estimate
#> [1] 6.026948