On Fri, Jan 3, 2020 at 8:20 AM Eric Berger wrote:
>
> Hi Joshua,
> Thanks for the comment but I guess I prefer a different behavior. If
> merge.xts() cannot handle the objects I pass in, I want it to fail.
> In fact, I typically adopt a naming convention where the variable name
> indicates the
Hi Joshua,
Thanks for the comment but I guess I prefer a different behavior. If
merge.xts() cannot handle the objects I pass in, I want it to fail.
In fact, I typically adopt a naming convention where the variable name
indicates the type. In my normal coding style my example would look
like:
aXts
On Fri, Jan 3, 2020 at 1:14 AM Eric Berger wrote:
>
> Hi Gabor and Duncan,
> Thanks for your comments. As Gabor points out, Duncan's suggestion
> does not work.
> For those interested, here is some minimal reproducible example to illustrate
>
> library(xts)
> dtV <- as.Date("2019-01-01")+1:5
> a
Hi Gabor and Duncan,
Thanks for your comments. As Gabor points out, Duncan's suggestion
does not work.
For those interested, here is some minimal reproducible example to illustrate
library(xts)
dtV <- as.Date("2019-01-01")+1:5
a <- xts(x=rnorm(5),order.by=dtV)
a1 <- a[1:3,]
a2 <- a[2:4,]
a3 <-
join = "left" only applies with merge.xts if there are two objects.
If there are more it acts the same as join = TRUE..
See the Details section of ?merge.xts
On Thu, Jan 2, 2020 at 1:29 PM Duncan Murdoch wrote:
>
> On 02/01/2020 9:31 a.m., Eric Berger wrote:
> > Hi Gabor,
> > This is great,
On 02/01/2020 9:31 a.m., Eric Berger wrote:
Hi Gabor,
This is great, thanks. It brought the time down to about 4 seconds.
The command
do.call("merge.xts",L)
also works in this case.
Suppose that instead of the default "outer" join I wanted to use, say, a
"left" join.
Is that possible? I tried a
> It is not clear what multiway left join means but merge.zoo (though
> not merge.xts) supports a generalized all= argument which is a logical
> vector having the same length as L that can be TRUE or FALSE for each
> object merged. The objects corresponding to TRUE will have all their
> times
It is not clear what multiway left join means but merge.zoo (though
not merge.xts) supports a generalized all= argument which is a logical
vector having the same length as L that can be TRUE or FALSE for each
object merged. The objects corresponding to TRUE will have all their
times included in
Hi Gabor,
This is great, thanks. It brought the time down to about 4 seconds.
The command
do.call("merge.xts",L)
also works in this case.
Suppose that instead of the default "outer" join I wanted to use, say, a
"left" join.
Is that possible? I tried a few ways of adding the
join="left"
parameter
You don't need Reduce as xts already supports mutliway merges. This
perfroms one
multiway merge rather than k-1 two way merges.
do.call("merge", L)
On Thu, Jan 2, 2020 at 6:13 AM Eric Berger wrote:
>
> Hi,
> I have a list L of about 2,600 xts's.
> Each xts has a single numeric column.
Quoting Eric Berger :
Hi,
I have a list L of about 2,600 xts's.
Each xts has a single numeric column. About 90% of the xts's have
approximately 500 rows, and the rest have fewer than 500 rows.
I create a single xts using the command
myXts <- Reduce( merge.xts, L )
By default, merge.xts()
Hi,
I have a list L of about 2,600 xts's.
Each xts has a single numeric column. About 90% of the xts's have
approximately 500 rows, and the rest have fewer than 500 rows.
I create a single xts using the command
myXts <- Reduce( merge.xts, L )
By default, merge.xts() does an outer join (which is
12 matches
Mail list logo