Standard Deviation in R (Example)

This article explains how to compute the standard deviation with the sd function in the R programming language.

Example Data

x <- c(1, 4, 3, 3, 9, 3, 1, 3, 2, 5, 7)    # Create example vector

Example: Application of sd Function in R

sd(x)                                      # Compute standard deviation
# 2.453198

The standard deviation of our example vector is 2.453198.

Leave a Reply

Your email address will not be published.

Fill out this field
Fill out this field
Please enter a valid email address.
You need to agree with the terms to proceed

Menu
Top