Skip to content

How to get data from another source when the first one fails...

1 message · George Kumar

#
Hi all,

I use following command to make getSymbols (from quantmod package) get data
from locally stored csv files.

setDefaults(getSymbols,src='csv')

My problem is that if the data is not found locally, I want it to get it
from yahoo/google. How to go about doing this. If setDefaults allowed
multiple sources, it would have been possible. Something like the following:

setDefaults(getSymbols,src='csv yahoo')

Please let me know how this can be done.

Thanks.
George