search for: n_th

Displaying 1 result from an estimated 1 matches for "n_th".

Did you mean: n'th
2010 Mar 14
2
Create vectors from a vector
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 vector s with 200 elements which are the product of all these vectors: i.e s1<-vnk[1]%*%vro[1] +p^(length(vp[1]+1)) s2<-vnk[1:2]%*%vro[1:2]+p^(length(vp[1:2]+1)) s3<-vnk[1:3]%*%vro[1:3]+p^(length(vp[1:3]+1)) ...................