Re: [R] Cutting a vector

2007-11-22 Thread jim holtman
Forget the last message. I hit return before understanding the question. Its too early on Thanksgiving and I just put the turkey in the oven. I would have an excuse if I were already sampling the punch. On Nov 22, 2007 8:15 AM, jim holtman <[EMAIL PROTECTED]> wrote: > Here is another way of doi

Re: [R] Cutting a vector

2007-11-22 Thread jim holtman
Here is another way of doing it: > x <- 1:50 > split(x, as.integer(seq(0, by=1, length=length(x))/5)) $`0` [1] 1 2 3 4 5 $`1` [1] 6 7 8 9 10 $`2` [1] 11 12 13 14 15 $`3` [1] 16 17 18 19 20 $`4` [1] 21 22 23 24 25 $`5` [1] 26 27 28 29 30 $`6` [1] 31 32 33 34 35 $`7` [1] 36 37 38 39 40 $

[R] Cutting a vector

2007-11-22 Thread Dani Valverde
Hello, I have a vector, lets say x <- 1:50 I would like it to be cut at certain points, being for example 1:5, 6:11, 12:17, ... How can I do it? I have tried the cut() function, but I don not know how to place the cutting points properly. Best regards, Dani -- Daniel Valverde SaubĂ­ Grup de Bi