Re: [R] create sequences from two "from" and "to" vectors

2009-01-09 Thread Greg Snow
.org > Subject: [R] create sequences from two "from" and "to" vectors > > > hi all, > how can I create sequences that start from a known vector, say x1 and > end > with another say x2- also suppose all the sequences will be the same > length. > I don&#

Re: [R] create sequences from two "from" and "to" vectors

2009-01-09 Thread Yasir Kaheil
Great! thank you so much! Dimitris Rizopoulos-4 wrote: > > one way is using mapply(), e.g., > > mapply(":", 1:4, 3:6) > > > I hope it helps. > > Best, > Dimitris > > > Yasir Kaheil wrote: >> hi all, >> how can I create sequences that start from a known vector, say x1 and end >> with anothe

Re: [R] create sequences from two "from" and "to" vectors

2009-01-09 Thread Marc Schwartz
on 01/09/2009 02:42 PM Yasir Kaheil wrote: > hi all, > how can I create sequences that start from a known vector, say x1 and end > with another say x2- also suppose all the sequences will be the same length. > I don't want to use a for loop > x1<-c(1,2,3,4); x2<-(3,4,5,6); > what I want is > 1 2 3

Re: [R] create sequences from two "from" and "to" vectors

2009-01-09 Thread Dimitris Rizopoulos
one way is using mapply(), e.g., mapply(":", 1:4, 3:6) I hope it helps. Best, Dimitris Yasir Kaheil wrote: hi all, how can I create sequences that start from a known vector, say x1 and end with another say x2- also suppose all the sequences will be the same length. I don't want to use a for

[R] create sequences from two "from" and "to" vectors

2009-01-09 Thread Yasir Kaheil
hi all, how can I create sequences that start from a known vector, say x1 and end with another say x2- also suppose all the sequences will be the same length. I don't want to use a for loop x1<-c(1,2,3,4); x2<-(3,4,5,6); what I want is 1 2 3 4 2 3 4 5 3 4 5 6 Thanks - Yasir H. Kaheil Colum