Re: [R] iterating through for loop

2012-02-03 Thread William Dunlap
---Original Message- > From: r-help-boun...@r-project.org [mailto:r-help-boun...@r-project.org] On > Behalf Of sagarnikam123 > Sent: Friday, February 03, 2012 1:32 AM > To: r-help@r-project.org > Subject: [R] iterating through for loop > > how to iterate two element

Re: [R] iterating through for loop

2012-02-03 Thread Petr PIKAL
Hi > [R] iterating through for loop > > how to iterate two elements each through for loop? > e.g. x<-c(1,2,4,7,34,6) > y<-c(3,5,6,9,34,7) > > for(z in x){ > print(paste(z,y)) } > > > i want both element of vector iterate serially with same position

[R] iterating through for loop

2012-02-03 Thread sagarnikam123
how to iterate two elements each through for loop? e.g. x<-c(1,2,4,7,34,6) y<-c(3,5,6,9,34,7) for(z in x){ print(paste(z,y)) } i want both element of vector iterate serially with same position -- View this message in context: http://r.789695.n4.nabble.com/iterating-through-for-loop-tp4354101