ez.readx | R Documentation |
read.xlsx
uses openxlsx package which does not require java and is much faster, but has a slightly different interface/parameters from xlsx package. internally trim (leading and trailing) string spaces
ez.readx(
file,
sheet = 1,
tolower = FALSE,
stringsAsFactors = FALSE,
blanksAsNA = TRUE,
na.strings = c("", "."),
makenames = TRUE,
detectDates = TRUE,
...
)
sheet |
The name or index of the sheet to read data from. |
tolower |
whether to convert all column names to lower case |
stringsAsFactors |
T/F |
blanksAsNA |
T/F, converts factor or character vector elements to NA if matching na.strings |
na.strings |
only applicable if blanksAsNA=T. e.g., c(”,'.','NA','na','N/A','n/a','NaN','nan') |
makenames |
if F, keep as is. if T, call make.names(unique=TRUE,allow_=TRUE) _ kept, The character "X" is prepended if necessary. All invalid characters are translated to "." .1 .2 etc appended for uniqueness |
detectDates |
If TRUE, attempt to recognise dates and perform conversion. |
when stringsAsFactors=T, in the returned data frame, string to factor
number stored as text in excel (->string) -> factor
read.xlsx(xlsxFile, sheet = 1, startRow = 1, colNames = TRUE,
rowNames = FALSE, detectDates = FALSE, skipEmptyRows = TRUE,
rows = NULL, cols = NULL, check.names = FALSE, namedRegion = NULL)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.