[R] Yahoo data download problem

From: SUMANTA BASAK <r_econometrics_at_yahoo.co.in>
Date: Fri 16 Jun 2006 - 17:52:22 EST

Hi all R-Experts,

I'm facing one problem in yahoo data downloading. I'm suing Windows XP, R 2.2.0, and i'm using yahoo.get.hist.quote function to download data. I need 500 companies of S&P index daily 'closing price' data for last ten years. My questions are:

  1. I have all the ticker names of S&P 500 companies in a .csv format. I'm reading those names in R and they are coming as data.frame object. How can i change this to a vector?
  2. How can i get all companies data downloaded using a simple "for" loop?

I'm using the following function for a single stock data.

s<-yahoo.get.hist.quote(instrument = "mo", destfile = paste("mo", ".csv", sep = ""), start="1996-01-01",

                     end="2006-06-16", quote = c("Close"), adjusted = TRUE, download = TRUE, origin = "1970-01-01",
                     compression = "d")

Sumanta Basak.                                  

        [[alternative HTML version deleted]]

R-help@stat.math.ethz.ch mailing list
https://stat.ethz.ch/mailman/listinfo/r-help PLEASE do read the posting guide! http://www.R-project.org/posting-guide.html Received on Fri Jun 16 17:55:55 2006

Archive maintained by Robert King, hosted by the discipline of statistics at the University of Newcastle, Australia.
Archive generated by hypermail 2.1.8, at Fri 16 Jun 2006 - 22:12:33 EST.

Mailing list information is available at https://stat.ethz.ch/mailman/listinfo/r-help. Please read the posting guide before posting to the list.