[R-sig-finance] Reading Foreign Exchange XML Data

Gabor Grothendieck ggrothendieck at myway.com
Sat Nov 6 02:39:40 CET 2004



I don't know specifically about that data but, in general,
if you have a sufficiently recent version of Excel and 
don't mind a semi-manual procedure you can transfer
XML to Excel and then to R without programming by:

- read data into Excel (sufficiently recent versions of
  Excel read XML directly.  Just use File | Open)
- select rectangular area of cells to transfer to R
- copy to clipboard (ctrl-c)
- read.table("clipboard") or suitable variation in R


Date:   Fri, 5 Nov 2004 18:39:58 -0500 
From:   Charles and Kimberly Maner <ckjmaner at carolina.rr.com>
To:   <r-sig-finance at stat.math.ethz.ch> 
Subject:   [R-sig-finance] Reading Foreign Exchange XML Data 

 

Hi all. Does anyone know of an R package which reads and dynamically
creates an R data object, (e.g., dataframe, ts, its object), from the
foreign exchange data posted on the Fed Reserve Bank of New York website,
http://www.ny.frb.org/xml/fx.html? Currently, I'm parsing it using a
sed/vim script to create a CSV file then importing it into R using read.csv.
I've a hunch there's an easier way but am yet to come across one. Any help
would be appreciated.


Thanks,
Charles



More information about the R-sig-finance mailing list