Safari Books Online is a digital library providing on-demand subscription access to thousands of learning resources.
The xlsx package has the function read.xlsx() for
reading Excel files. This will read the first sheet of an Excel
spreadsheet:
# Only need to install onceinstall.packages("xlsx")library(xslx)data<-read.xlsx("datafile.xlsx",1)
For reading older Excel files in the .xls
format, the gdata package has the function read.xls():
# Only need to install onceinstall.packages("gdata")library(gdata)# Read first sheetdata<-read.xls("datafile.xls")