Description Usage Arguments Author(s) References Examples
Read the contents of a worksheet into an R data.frame. This function is just a wrapper for the read.xlsx2 function from xlsx package.
1 |
file |
the path to the file to read |
sheetIndex |
a number indicating the index of the sheet to read from the workbook |
startRow |
a numeric value specifying the starting row |
colIndex |
a numeric vector indicating the cols you want to extract. If NULL, all columns found will be extracted. |
endRow |
a number specifying the index of the last row to pull. If NULL, read all the rows in the sheet. |
header |
a logical value indicating whether the first row corresponding to the first element of the rowIndex vector contains the names of the variables. |
... |
other arguments to read.xlsx2 function |
Alboukadel Kassambara <alboukadel.kassambara@gmail.com>
http://www.sthda.com
1 2 3 | file <- system.file("tests", "test_import.xlsx", package = "xlsx")
res <- xlsx.readFile(file, 1) # read first sheet
head(res)
|
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.