[R] Random sequence of days?

2008-08-20 Thread Lauri Nikkinen
Dear list, I tried to find a solution for this problem from the archives but couldn't find any. I would like sample sequence of ten days from vector d d - seq(as.Date(2007-02-12), as.Date(2008-08-18), by=days) so that the days follow each other (sample(d, 10) is not the appropriate solution).

Re: [R] Random sequence of days?

2008-08-20 Thread Moshe Olshansky
How about d[sample(length(d),10)] --- On Wed, 20/8/08, Lauri Nikkinen [EMAIL PROTECTED] wrote: From: Lauri Nikkinen [EMAIL PROTECTED] Subject: [R] Random sequence of days? To: [EMAIL PROTECTED] Received: Wednesday, 20 August, 2008, 4:04 PM Dear list, I tried to find a solution

Re: [R] Random sequence of days?

2008-08-20 Thread Jeff Newmiller
Lauri Nikkinen wrote: Dear list, I tried to find a solution for this problem from the archives but couldn't find any. I would like sample sequence of ten days from vector d d - seq(as.Date(2007-02-12), as.Date(2008-08-18), by=days) so that the days follow each other (sample(d, 10) is not the

Re: [R] Random sequence of days?

2008-08-20 Thread Lauri Nikkinen
(length(d),10)] --- On Wed, 20/8/08, Lauri Nikkinen [EMAIL PROTECTED] wrote: From: Lauri Nikkinen [EMAIL PROTECTED] Subject: [R] Random sequence of days? To: [EMAIL PROTECTED] Received: Wednesday, 20 August, 2008, 4:04 PM Dear list, I tried to find a solution for this problem from

Re: [R] Random sequence of days?

2008-08-20 Thread Lauri Nikkinen
[EMAIL PROTECTED] wrote: From: Lauri Nikkinen [EMAIL PROTECTED] Subject: [R] Random sequence of days? To: [EMAIL PROTECTED] Received: Wednesday, 20 August, 2008, 4:04 PM Dear list, I tried to find a solution for this problem from the archives but couldn't find any. I would