Hello! All,

I am working on 10000x1000 matrix say 'mat' and i want to subset this matrix
in a fashion that in new matrix i get columns 2,3,9,10,16,17,23,24.......so
on. That is pair of columns after every interval of 7. I tried following but
i got an error which is obvious.

>dim(mat)
[1] 10000   10

>a=mat[,c(seq(c(2,3),ncol(mat),7))]
Warning messages:
1: In if (n < 0L) stop("wrong sign in 'by' argument") :
  the condition has length > 1 and only the first element will be used
2: In if (n > .Machine$integer.max) stop("'by' argument is much too small")
:
  the condition has length > 1 and only the first element will be used
3: In if (dd < 100 * .Machine$double.eps) return(from) :
  the condition has length > 1 and only the first element will be used
4: In 0L:n : numerical expression has 2 elements: only the first used

Is there any other way to do it?? Please, help!

regards
Lee

	[[alternative HTML version deleted]]

