[R] "Smart update" utility (or coding) for data files

Prof Brian Ripley ripley at stats.ox.ac.uk
Tue Jan 6 10:59:28 CET 2004


On Tue, 6 Jan 2004, Uwe Ligges wrote:

> Ashutosh Tayshete wrote:
> 
> > Hi,
> > 
> > I am a new user of R and this is my first e-mail here. Please enlighten me
> > on any etiquette issues I may have overstepped on.
> > 
> > My questions is as follows:
> > 
> > I need to do some data analysis for data from .csv files for stocks
> > (that I have obtained from yahoo)
> > 
> > How can I do a "smart update" of this data from Yahoo (or any other
> > site if you wish), so that in some way, I do not have to go and download
> > the new data from Excel every day.
> > 
> > I am running my code from a script file. So every time I start the program
> > I'd like the data to be up-to-date (ofcourse I shall be connected to the
> > internet.) Is there a utility I can download for this? If not, any hints
> > on how to code this will be appreciated.
> > 
> > many thanks
> > A
> > 
> 
> See ?url for such a connection.
> 
> 
> Instead of read.csv("filename"), use
>   read.csv(url("TheRelevantURL"))

For yahoo, see get.hist.quote() in package tseries which may do all you 
want.

-- 
Brian D. Ripley,                  ripley at stats.ox.ac.uk
Professor of Applied Statistics,  http://www.stats.ox.ac.uk/~ripley/
University of Oxford,             Tel:  +44 1865 272861 (self)
1 South Parks Road,                     +44 1865 272866 (PA)
Oxford OX1 3TG, UK                Fax:  +44 1865 272595




More information about the R-help mailing list