[R-SIG-Finance] merge.xts problem
Joshua Ulrich
josh.m.ulrich at gmail.com
Thu Feb 21 03:58:30 CET 2013
Nikos,
Thank you for the reproducible example. This issue was fixed on
R-Forge as of revision 768.
Best,
--
Joshua Ulrich | about.me/joshuaulrich
FOSS Trading | www.fosstrading.com
R/Finance 2013: Applied Finance with R | www.RinFinance.com
On Thu, Feb 14, 2013 at 1:58 PM, Nikos Rachmanis
<nikos.rachmanis at gmail.com> wrote:
> Hi Joshua,
>
> I did some additional research and found that the command below, which tries
> to shift the index by 3 days, creates a problem and does not allow to the 2
> datasets to be combined.
> #shift the index
> index(weekly)<-index(weekly)+3
>
> This used to work in the previous version but not anymore.
>
> Attached you will find the datasets and r code.
>
> Nikos
>
>
>
>
> On 2/13/2013 6:55 AM, Joshua Ulrich wrote:
>>
>> Nikos,
>>
>> Please provide a minimal reproducible example. For examples of how to
>> do this, see:
>> http://stackoverflow.com/q/5963269/271616
>>
>> Best,
>> --
>> Joshua Ulrich | about.me/joshuaulrich
>> FOSS Trading | www.fosstrading.com
>>
>> R/Finance 2013: Applied Finance with R | www.RinFinance.com
>>
>>
>> On Tue, Feb 12, 2013 at 11:34 PM, Nikos Rachmanis
>> <nikos.rachmanis at gmail.com> wrote:
>>>
>>> Hi all,
>>>
>>> Just wondering if someone has come across this problem with the
>>> merge.xts function after updating from 0.8-6 to 0.9-3 version.
>>>
>>> I am trying to merge 2 xts objects one with daily observations and
>>> another one with weekly.
>>>
>>> With the older packet and the following command:
>>>
>>> tradedata<-merge.xts(timeseries.daily,timeseries.daily,join="left")
>>>
>>> the merge is done fine. With the new one does not work and although puts
>>> together the 2 datasets shows all the incoming observations as NA.
>>>
>>> Daily dataset
>>> Dates IMM0ECOL Index IMM0ECOS Index IMM0ENCL Index
>>> 12/26/2000 4316 38769 26834
>>> 1/2/2001 5495 29995 15885
>>> 1/9/2001 5786 41915 21845
>>> 1/16/2001 6866 41480 19696
>>>
>>>
>>> Weekly dataset
>>> Index SP1.OPEN SP1.HIGH
>>> 1/2/1990 356.35 362.85
>>> 1/3/1990 363.25 364.8
>>> 1/4/1990 361.4 362.6
>>> 1/5/1990 359.2 359.6
>>> 1/8/1990 354.1 358.4
>>> 1/9/1990 357.8 358.1
>>> 1/10/1990 351.9 353.2
>>> 1/11/1990 352.4 353.5
>>>
>>>
>>> Has the command changed?
>>>
>>> Thanks,
>>>
>>> Nikos
>>>
>>> [[alternative HTML version deleted]]
>>>
>>> _______________________________________________
>>> R-SIG-Finance at r-project.org mailing list
>>> https://stat.ethz.ch/mailman/listinfo/r-sig-finance
>>> -- Subscriber-posting only. If you want to post, subscribe first.
>>> -- Also note that this is not the r-help list where general R questions
>>> should go.
>
>
More information about the R-SIG-Finance
mailing list