Re: [R] Manipulating Arrays

2009-10-11 Thread ampc
Thanks baptiste. Works as expected. ampy ampc wrote: > > Manipulating Arrays > Using the below data: > > df <- structure(list(dim1 = structure(c(1L, 3L, 1L, 4L, 1L, 2L, 2L, > 2L, 3L, 1L, 4L, 3L, 4L, 4L, 3L, 2L), .Label = c("a1", "a2", "a3&quo

[R] Manipulating Arrays

2009-10-10 Thread ampc
Manipulating Arrays Using the below data: df <- structure(list(dim1 = structure(c(1L, 3L, 1L, 4L, 1L, 2L, 2L, 2L, 3L, 1L, 4L, 3L, 4L, 4L, 3L, 2L), .Label = c("a1", "a2", "a3", "a4"), class = "factor"), dim2 = structure(c(2L, 1L, 2L, 2L, 4L, 3L, 1L, 3L, 1L, 3L, 2L, 4L, 3L, 4L, 1L, 4L), .Label =

Re: [R] Matching Dates Closest without going over

2009-10-10 Thread ampc
Thanks Gabor. That was exactly what I was looking for. Ampy ampc wrote: > > Hi, > > I have 2 date vectors d1 and d2. > > d1 <- structure(c(14526, 14495, 14464, 14433, 14402, 14371, 14340, 14309, > 14278, 14247, 14216, 14185), class = "Date") >

[R] Matching Dates Closest without going over

2009-10-09 Thread ampc
Hi, I have 2 date vectors d1 and d2. d1 <- structure(c(14526, 14495, 14464, 14433, 14402, 14371, 14340, 14309, 14278, 14247, 14216, 14185), class = "Date") d2 <- structure(c(14526, 14509, 14488, 14466, 14453, 14441, 14396, 14388, 14343, 14333, 14310, 14281), class = "Date") I would like to cre