Standard Deviation in R (3 Examples) | Apply sd() Function in RStudio | Handle NA Values & Real Data

Опубликовано: 16 Июль 2026
на канале: Statistics Globe
3,822
35

How to compute the standard deviation in the R programming language. More details: https://statisticsglobe.com/standard-...
R code of this video:

x <- c(4, 5, 1, 8, 9, 4) # Create example vector in R

sd(x) # Apply sd function

x_NA <- c(x, NA) # Create vector with NA

sd(x_NA) # Apply sd to NA vector

sd(x_NA, na.rm = TRUE) # Use na.rm option

data(iris) # Load iris data
head(iris)

sd(iris$Sepal.Length) # Apply sd to column of iris

Follow me on Social Media:
Facebook – Statistics Globe Page:   / statisticsglobecom  
Facebook – Group for Discussions & Questions:   / statisticsglobe  
LinkedIn – Statistics Globe Page:   / statisticsglobe  
LinkedIn – Group for Discussions & Questions:   / 12555223  
Twitter:   / joachimschork  

Music by bensound.com