[R] sd help

GlenB glnbrntt at gmail.com
Sun Sep 4 09:40:36 CEST 2011


The sd function is doing *exactly* what it should.

the sd of 5 is "NA", and the sd of 7 is "NA"

try looking at "a" itself. My guess is that you didn't intend to have
two columns each with one value.

Did you instead intend to have 5 and 7 in one vector, like so:

a<-c(5,7)
sd(a)

Glen



More information about the R-help mailing list