[R] rbind in a loop with " : " elements

bilelsan sanbilel at yahoo.fr
Wed Aug 22 15:23:51 CEST 2012


Dear Ruser,
Below, the deal (you can copy paste):

r=3 ; set.seed(1)
v <- matrix(c(rnorm(40)),10,4) 
for (j in 1:4){
    for (i in 1:r){
        x <- t(v[,j]^(i)*v[,1:4]^((r-(4-1)):r))
        print(x)
        }
    }

How to reach to " x " " row bind " inside or outside (preferred) of the
loop. 
To obtain at the end something like:
> x
matrix( , 12*4, 10)

Any help or advice is very welcome
Many regards
Bilel



--
View this message in context: http://r.789695.n4.nabble.com/rbind-in-a-loop-with-elements-tp4640976.html
Sent from the R help mailing list archive at Nabble.com.



More information about the R-help mailing list