Skip to content
Prev 284064 / 398502 Next

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


--
View this message in context: http://r.789695.n4.nabble.com/iterating-through-for-loop-tp4354101p4354101.html
Sent from the R help mailing list archive at Nabble.com.