zoo makes no assumptions regarding times and
dates other than they are ordered and have certain
methods. It doesn't even know the difference between
a time and a date nor does it know about any time
or date classes. (The exception is interface routines
such as read.zoo.)
If the dates uniquely spe
Sorry there was some garbage at the beginning. Should just
be:
On Sat, Mar 14, 2009 at 6:03 AM, Gabor Grothendieck
wrote:
> If its truly 1-1, i.e. they have the same number of comonents and
> the i-th component of the first series corresponds to the i-th
> component of the second seriesm, then j
Jeff:
As a followup to this question -- I have a pair of tables that I want to do
a 1 to 1 join on, but the date field contains the full time, down to the
second, to base the join on (e.g. in a given day, there are going to MANY
observations, but not at the exact same time). I might be missing
so
The data.table package may be more in line with what you are after, but xts
and zoo can also do what you need in this particular example:
> a <- xts(c('a1','a2','a3'), timeBasedSeq(20090101/20090103))
> colnames(a) <- 'foo'
> b <- xts(c('b1'), as.Date('2009-01-04'))
> colnames(b) <- 'foo'
> a
I have dataframe a:
sym date val1
===
foo 20090101 a1
foo 20090102 a2
foo 20090103 a3
and dataframe b:
sym date val2
===
foo 20090104 b1
I would like to join/merge them to generate the following:
sym date val2 val1
===
foo 20090104 b1 a3
i.e. an equijoin on
5 matches
Mail list logo