Re: [R] Dates and arrays

2009-05-13 Thread Gabor Grothendieck
There is a one line nextfri function defined in the zoo-quickref vignette and replacing 5 with 1 in its definition will give you next Monday. The prior Monday is 7 days before that so take the closest of the two. See R News 4/1 for more about dates. On Wed, May 13, 2009 at 4:23 PM, myshare wro

Re: [R] Dates and arrays

2009-05-13 Thread jim holtman
On Wed, May 13, 2009 at 4:23 PM, myshare wrote: > hi, > > I have a and data frame with date-column and some other columns. > My first question is what is the fastest way to get the index of an > array if I know the value f.e > > > x = c(4,5,6,7,8) > > so i know the value is 6.. i.e. the index is

[R] Dates and arrays

2009-05-13 Thread myshare
hi, I have a and data frame with date-column and some other columns. My first question is what is the fastest way to get the index of an array if I know the value f.e > x = c(4,5,6,7,8) so i know the value is 6.. i.e. the index is 3. What I currently do is loop over the array, I was thinking if