[R] Problems with sample variance

Ben Bolker
Thu, 21 May 2009 01:50:38 -0000

Chloe Smith wrote:
>
>
> [snip]
>
> what I got was just the variance for the last sample i.e. the 1000th
> sample
>
> but what I want is 1000 variance.
>
>

m=1000;n=15
r<-matrix(rnorm(m*n),nrow=m)
apply(r,1,var)


--
View this message in context:
http://www.nabble.com/Problems-with-sample-variance-tp23645919p23646590.html
Sent from the R help mailing list archive at Nabble.com.