Re: [R] Create vectors from a vector

2010-03-14 Thread Dimitris Kapetanakis
Thanks a lot. It is exactly what I was looking for. I found though and another way (worse) to do it, so I just post in case someone find it useful sk<-nz*e*(vnk[c(i:0)]%*%vro[c(0:i)]) for(i in 0:200){ sk[i]<-nz*e*(vnk[c(i:0)]%*%vro[c(0:i)]) } -- View this message in context: http://n4.nabble.

Re: [R] Create vectors from a vector

2010-03-14 Thread David Winsemius
On Mar 14, 2010, at 8:11 AM, Dimitris Kapetanakis wrote: Dear all, I would like to create a number of vectors which contain the the first n elements of an existing vector. For example I have the vectors vnk (200x1) and vro(200x1) and I want to create 200 vectors that contain the 1st till

[R] Create vectors from a vector

2010-03-14 Thread Dimitris Kapetanakis
Dear all, I would like to create a number of vectors which contain the the first n elements of an existing vector. For example I have the vectors vnk (200x1) and vro(200x1) and I want to create 200 vectors that contain the 1st till the n_th element of the vectors and thus be able to create a vec