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

markleeds at verizon.net markleeds at verizon.net
Mon Jun 26 19:40:19 CEST 2006


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 strange vectors back in the sense that the numbers in them did not make no sense to me. obviously,
i must be doing something wrong.  thanks a lot.

                                       mark



More information about the R-help mailing list