pop_sd: Calculate Population Standard Deviation

View source: R/pop_sd.R

pop_sdR Documentation

Calculate Population Standard Deviation

Description

This function calculates the population standard deviation for a numeric vector.

Usage

pop_sd(x)

Arguments

x

A numeric vector for which the population standard deviation should be calculated.

Value

A numeric value representing the population standard deviation of the vector.

Examples

# Example usage:
library(dplyr)
df <- data.frame(weight = c(2, 4, 6, 8, 10))
df |> 
  summarize(population_mean = mean(weight), 
            population_sd = pop_sd(weight))


moderndive documentation built on Sept. 11, 2024, 9:26 p.m.