Displaying 1 result from an estimated 1 matches for "275434".
Did you mean:
375434
2003 May 05
3
Help to make a for for index
Hi,
I try to make a vector in a for for loop, but it dont work.
Look:
> a <- 0;for(i in c(1:2)) { for(j in c(1:2)) { a <- i+j; print(a)}}
[1] 2
[1] 3
[1] 3
[1] 4
I try to make this a vector, like this:
[1] 2 3 3 4
> a <- 0;for(i in c(1:2)) { for(j in c(1:2)) { a[j] <- i+j}}; print(a)
[1] 3 4
> a <- 0;for(i in c(1:2)) { for(j in c(1:2)) { a[i] <- i+j}}; print(a)
[1]