Debbie Zhang schrieb:
> Now, I am trying to obtain the sample variance (S^2) of the 1000 samples that 
> I have generated before.
>
> I am wondering what command I should use in order to get the sample variance 
> for all the 1000 samples.
>
>  
>
> What I am capable of doing now is just typing in
>
> var(z[[1]])
>
> var(z[[2]])..................... 
>
>  
>
>   
Common please use the package brain 2.0. What is the difference between
this and what you already had here (???):
>> for(i in 1:n){
>> x[[i]]=rnorm(i,0,1)
>> }
>>     

hint: its only a small change.

Please do some introductionary exercises. You find plenty of material here:
http://cran.r-project.org/manuals.html
and here:
http://cran.r-project.org/other-docs.html

Stefan

______________________________________________
R-help@r-project.org mailing list
https://stat.ethz.ch/mailman/listinfo/r-help
PLEASE do read the posting guide http://www.R-project.org/posting-guide.html
and provide commented, minimal, self-contained, reproducible code.

Reply via email to