Skip to content
Prev 4720 / 15274 Next

IBrokers- how to keep target file from being re-written?

Hi Vince,

I should probably let a ... arg pass to write.table, but I'll have to
check that doesn't cause issues.

If you pass in an *open* file handle, you will likely get the output you want.

something like:

fh <- file("EStest.dat", open="a")
reqHistoricalData(tws, twsSTK("AAPL"), file=fh)


Alternatively, with reqHistory you can just let the function merge in
memory, and then use write.zoo to save to a csv file.

write.zoo(reqHistory(tws, twsSTK("AAPL")), file="AAPL.csv")
system("head AAPL.csv")
system("wc -l AAPL.csv")

HTH
Jeff
On Tue, Aug 11, 2009 at 11:25 AM, Vince Fulco<vfulco1 at gmail.com> wrote: