[R] sample

About this list Date view Thread view Subject view Author view Attachment view

From: Rogério Rosa da Silva (rrsilva@ib.usp.br)
Date: Thu 06 May 2004 - 04:50:26 EST


Message-id: <200405051550.26630.rrsilva@ib.usp.br>

Dear List:

        I have the following simple program:

x<- sample(site)
VarGuilda1<- var(tapply(x,site,func1))
VarGuilda2<- var(tapply(x,site,func2))
VarGuilda3<- var(tapply(x,site,func3))
VarGuilda4<- var(tapply(x,site,func4))
VarGuilda5<- var(tapply(x,site,func5))
VarGuilda6<- var(tapply(x,site,func6))
VarGuilda7<- var(tapply(x,site,func7))
VarGuilda8<- var(tapply(x,site,func8))
VarGuilda9<- var(tapply(x,site,func9))
Var<-cbind(VarGuilda1,VarGuilda2,VarGuilda3,VarGuilda4,VarGuilda5,VarGuilda6,VarGuilda7,VarGuilda8,VarGuilda9)
write(Var,file="LAU_Var_01.txt", ncol=9)

        Every time I want to repeat this I have to change the name of *.txt
file manually. How can I automate this, so it could be done for all the  
*.txt files (1000) I have to generate.

        Thanks in advance, Rogério

-- 
Rogério R. Silva
MZUSP http://www.mz.usp.br
Linux User #354364
Linux counter http://counter.li.org

______________________________________________ R-help@stat.math.ethz.ch mailing list https://www.stat.math.ethz.ch/mailman/listinfo/r-help PLEASE do read the posting guide! http://www.R-project.org/posting-guide.html


About this list Date view Thread view Subject view Author view Attachment view

This archive was generated by hypermail 2.1.3 : Mon 31 May 2004 - 23:05:07 EST