Perhaps this will help.  It doesn't require an API.  Not sure how robust 
the approach is across series, either.
Matt

library(RCurl)
library(xts)

mnemonic <- "EXAUUS"
startdate <- "1971-01-01"
enddate <- "2001-12-01"
vintagedate <- "1998-03-02"
fileformat <- "1"
baseurl <-paste("http://alfred.stlouisfed.org/series/downloaddata?seid=",
                 mnemonic,sep="")
print(baseurl)
if(url.exists("http://alfred.stlouisfed.org/"))
   dloadfile <- postForm(baseurl,
            "_qf__mainform" = "",
            "units" = "lin",
            "obs_start_date" = startdate,
            "obs_end_date" = enddate,
            "entered_vintage_dates" = vintagedate,
            "file_type" = fileformat,
            "file_format" = "txt",
            "download_data" = "Download Data", style = "POST")

temp <- tempfile()
writeBin(as.vector(dloadfile), temp)
datafilename <- paste(mnemonic,"_",fileformat,".txt",sep="")
data <- read.delim(unz(temp, datafilename))
#header will be :
#observation_date  EXAUUS    realtime_start_date realtime_end_date
tempdata <- as.xts(data[,2], order.by=as.Date(data[,1],format="%Y-%m-%d"))
assign(paste(mnemonic,"_as_of_",vintagedate,sep=""),tempdata)
rm(tempdata,data,datafilename,temp,baseurl,dloadfile,startdate,enddate,fileformat,mnemonic,vintagedate)


	[[alternative HTML version deleted]]

