Reading an Excel file into R

  EDS > Consulting
printer friendly version Print
Page

The current version of stat/transfer we have in EDS does not convert files into R. This feature is coming in the next version of stat/transfer (shipping now). In the meantime, here's how to do it.

First, write your spreadsheet out as a comma-delimited file (csv). Then, in R, give the commands:

   require(foreign)
   read.csv("file.dat", header = TRUE, row.names = 1, sep=",")

Give the command help(read.table) in R for more complete information.