Skip to content

Instantly share code, notes, and snippets.

Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save ranamahmud/0fd69a83d823be174a64745de96ea53b to your computer and use it in GitHub Desktop.
Save ranamahmud/0fd69a83d823be174a64745de96ea53b to your computer and use it in GitHub Desktop.
Md Rana Mahmud
July 1, 2018
x <- c(1,2,3,4,5,6,7,8,9,10)
sd(x)
## [1] 3.02765
data(iris)
names(iris)
## [1] "Sepal.Length" "Sepal.Width" "Petal.Length" "Petal.Width"
## [5] "Species"
sd(iris$Sepal.Length)
## [1] 0.8280661
x.miss <- c(1,2,3,NA,5,6,NA,7,NA,9,10)
sd(x.miss)
## [1] NA
sd(x.miss, na.rm = TRUE)
## [1] 3.248626
sd(iris$Sepal.Length)^2
## [1] 0.6856935
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment