[R] probably need to se sapply but i can't get it

2006-06-26 Thread markleeds
Hi : I think I need to use sapply but I can't figure this out. Suppose I have two vectors : tempa ( 4, 6,10 ) and tempb ( 11,23 ,39 ) I want a function that returns 4:11,6:23 and 10:39 as vectors. I tried : sapply(1:length(tempa) function (z) seq(tempa[z],tempb[z]) but i got 3 really

Re: [R] probably need to se sapply but i can't get it

2006-06-26 Thread Marc Schwartz (via MN)
On Mon, 2006-06-26 at 12:40 -0500, [EMAIL PROTECTED] wrote: Hi : I think I need to use sapply but I can't figure this out. Suppose I have two vectors : tempa ( 4, 6,10 ) and tempb ( 11,23 ,39 ) I want a function that returns 4:11,6:23 and 10:39 as vectors. I tried :

Re: [R] probably need to se sapply but i can't get it

2006-06-26 Thread Thomas Lumley
On Mon, 26 Jun 2006, [EMAIL PROTECTED] wrote: Hi : I think I need to use sapply but I can't figure this out. Suppose I have two vectors : tempa ( 4, 6,10 ) and tempb ( 11,23 ,39 ) I want a function that returns 4:11,6:23 and 10:39 as vectors. I tried : sapply(1:length(tempa) function