Re: Importing shiller xls from http://

classic Classic list List threaded Threaded
1 message Options
Reply | Threaded
Open this post in threaded view
|

Re: Importing shiller xls from http://

Kenton Russell

> Not sure if this was adequately answered.  Check out the post at http://timelyportfolio.blogspot.com/2011/04/historical-sources-of-bond-returns-with.html for more but this worked for me.
>
>
> #get Shiller data for inflation and US Treasury 10 year
> require(gdata)
> URL <- "http://www.econ.yale.edu/~shiller/data/ie_data.xls"
> shillerData <- read.xls(URL,sheet="Data",pattern="Rate GS10")
> #strip out date(1), CPI(5), and GS10(7)
> shillerData <- shillerData[,c(1,5,7)]
>
>
> Kent
>
> On Tue, Jan 25, 2011 at 2:06 PM, cameron <raymond.fu at invesco.com> wrote:
> >
> > I know a lot of people asked similar questions like this.  I have tried using
> >
> > read.xls ()
> > Error in .Call("ReadXls", file, colNames, sheet, type, from, rowNames,  :
> >  Incorrect number of arguments (11), expecting 10 for ReadXls
> >
> > read.table or read.csv (Wrong table format)
> >
> > odbcConnectExcel have problem with the URL
> >
> > I want to import this excel file
> > (http://www.econ.yale.edu/~shiller/data/ie_data.xls) from row 8 in Data
> > sheet.
>
> How to import a spreadsheet from the internet was asked less than 24
> hours ago on this list.  See:
> http://rwiki.sciviews.org/doku.php?id=tips:data-io:ms_windows
>
> e.g.
>
> library(gdata)
> URL <- "http://www.econ.yale.edu/~shiller/data/ie_data.xls"
> DF <- read.xls(URL, pattern = "Fraction")
>
>
> --
> Statistics & Software Consulting
> GKX Group, GKX Associates Inc.
> tel: 1-877-GKX-GROUP
> email: ggrothendieck at gmail.com
>

        [[alternative HTML version deleted]]

_______________________________________________
[hidden email] mailing list
https://stat.ethz.ch/mailman/listinfo/r-sig-finance
-- Subscriber-posting only. If you want to post, subscribe first.
-- Also note that this is not the r-help list where general R questions should go.