
Many thanks Vincent. It does run on several pages and layout seems to be constant so your route might be very useful..

I was hoping it should be possible to request that data using http get method as for historical prices, I will also try to look down that route

If / when I get around this I will keep the list posted


Rgds,
Julien



> Date: Wed, 4 Jan 2012 21:47:31 +0900
> Subject: Re: [R-SIG-Finance] List index constituents of an index in R? quantmod?
> From: zoonek@gmail.com
> To: r-sig-finance@r-project.org
> CC: j_cuisinier@hotmail.com
> 
> You can use the XML package to parse the page and extract the contents
> of the table:
>   library(XML)
>   index <- "^DJI"
>   url <- paste("http://uk.finance.yahoo.com/q/cp?s=", index, sep="")
>   symbols <- readHTMLTable(url, as.data.frame=FALSE)[[10]]$Symbol
> 
> You should check the size of the result: large indices may be split
> across several pages, and the layout of the page may change.
> 
> -- Vincent
> 
> On 4 January 2012 21:24, julien cuisinier <j_cuisinier@hotmail.com> wrote:
> > Is anyone aware of an existing function to download from yahoo finance
> > the list of an index constituents?
 		 	   		  
	[[alternative HTML version deleted]]

