Become an expert in R — Interactive courses, Cheat Sheets, certificates and more!
Get Started for Free

readXL

Read an Excel File


Description

readXL reads an Excel file, either of type .xls or .xlsx into an R data frame; it provides a front end to the read_excel function in the readxl package. excel_sheets is re-exported from the readxl package and reports the names of spreadsheets in an Excel file.

Usage

readXL(file, rownames = FALSE, header = TRUE, na = "", sheet = 1, 
  stringsAsFactors = FALSE)
  
excel_sheets(path)

Arguments

file, path

path to an Excel file.

rownames

if TRUE (the default is FALSE), the first column in the spreadsheet contains row names (which must be unique—i.e., no duplicates).

header

if TRUE (the default), the first row in the spreadsheet contains column (variable) names.

na

character string denoting missing data; the default is the empty string, "".

sheet

number of the spreadsheet in the file containing the data to be read; the default is 1.

stringsAsFactors

if TRUE (the default is FALSE) then columns containing character data are converted to factors.

Value

a data frame

Author(s)

See Also


RcmdrMisc

R Commander Miscellaneous Functions

v2.7-1
GPL (>= 2)
Authors
John Fox [aut, cre], Robert Muenchen [ctb], Dan Putler [ctb]
Initial release
2020-08-12

We don't support your browser anymore

Please choose more modern alternatives, such as Google Chrome or Mozilla Firefox.