[R] Help needed for getYahooData in TTR package & writing the Yahoo data to excel

Gabor Grothendieck ggrothendieck at gmail.com
Sun Oct 10 15:15:42 CEST 2010


On Sun, Oct 10, 2010 at 8:09 AM, David Winsemius <dwinsemius at comcast.net> wrote:
>
> On Oct 10, 2010, at 5:27 AM, vanilla fantasy wrote:
>
>> Just trying to be clearer on the problem faced, the dates in the 1st
>> colume become 1,2,3,4 in excel as below, the screenshot of how data appears
>> in excel is attached.
>
> I can affirm that there was at one time a jpg since you copied me an my mail
> client is much less suspicious about attachments than is the mainly lis
> server. Nobody else got a copy, though.
>
>>
>>              Open      High         Low       Close      Volume
>> 1          18937.45 19187.61 18937.45 19002.86      0
>> 2          19003.51 19003.51 18221.82 18542.55      0
>> 3          18574.01 18582.74 18168.27 18168.27      0
>> 4          18194.05 18285.73 18068.10 18193.41      0
>> 5          18246.10 18887.56 18246.10 18850.92      0
>
> THat was really not a data.frame in R, but rahter an xts object and when
> write.table coverted it to a data.frame the dates (which were an attribute
> got stripped off.:
>

write.zoo in the zoo package can write xts objects. See ?write.zoo:

   write.zoo(N225, file = "myfile.dat", ...possibly other arguments...)


-- 
Statistics & Software Consulting
GKX Group, GKX Associates Inc.
tel: 1-877-GKX-GROUP
email: ggrothendieck at gmail.com



More information about the R-help mailing list