[R] Re : Save result in a For Loop

ssim@lic.co.nz ssim at lic.co.nz
Tue Dec 14 20:43:41 CET 2004


Hiya,

I have been struggling to save the result from the FOR loop. What is the
best way to do it, as I need the result to merge with another dataset for
further analysis ?

for (dd in ((M-10):M)){
+ dist<-(32-dd)
+ r<-1/2*(1-exp(-2*dist/100))
+ map<-c(dd,round(r,4))
+ print(map)
+ next
+ }

Thanks. Stella
___________________________________________________________________________
This message, including attachments, is confidential. If you...{{dropped}}




More information about the R-help mailing list