Testdata <- data.frame(var_1 = c(1:4,NA), var_2 = 6:10,var_3 = 11:15)
Testdata
## var_1 var_2 var_3
## 1 1 6 11
## 2 2 7 12
## 3 3 8 13
## 4 4 9 14
## 5 NA 10 15
apply(Testdata, 1, function(x) sd(x, na.rm = T))
## [1] 5.000000 5.000000 5.000000 5.000000 3.535534
sd(c(10,15))
## [1] 3.535534
apply(Testdata, 1, sd)
## [1] 5 5 5 5 NA