[R-SIG-Finance] [R-sig-finance] Downloading data from specific website

Cedrick Johnson cedrick at cedrickjohnson.com
Thu Jun 18 22:30:13 CEST 2009


While my knowledge of converting things and all things xts/zoo 
conversion and applying dates is *severely* lacking, I borrowed this 
from quantmod getSymbols source code and should get you in the ballpark:


tmp = tempfile()
download.file("http://www.jmulti.de//download/datasets/e6.dat", 
destfile=tmp,quiet=FALSE)
dataset = read.delim(tmp, header=TRUE, skip=10, sep="\t")
unlink(tmp)

from here, you can turn 'dataset' into whatever you would like. Someone 
more experienced could share in how to handle the header which seems to 
be a bit screwed up, as evidenced by my output here
 > head(dataset)
                            Dp.............R
1 -0.00313258          0.083               
2 0.0188713            0.083     


Hope that at least points you in the right direction.. Looks like from 
the explanation that the data is quarterly.

-cj


Bogaso wrote:
> Hi,
>
> I need to download some econometric data from http://www.jmulti.de/
> The path is :
> Datasets -> Download data (2nd link) -> e6.dat
>
> I prefer the downloaded data as a zoo object. How can I develop some R
> function to do that? Your help will be highly appreciated.
>
> Regards,
>



More information about the R-SIG-Finance mailing list