Reputation: 1
I have to import an excel file into R. I need to import starting at line x and import everything after that. How do I demonstrate that in the code.
I have tried:
import <- read.xlsx("filename", "Sheet1", rowIndex = 13:end) import <- read.xlsx("filename", "Sheet1", rowIndex = 13:)
and both of these threw errors, so I just ask for rows 13 to 200,000 which is bigger than it will ever be. How do I reference the last row when the last row is constantly changing depending on the dataset that I am using.
Upvotes: 0
Views: 776
Reputation: 18742
xlsx::read.xlsx(..., startRow = 13, ...)
or readxl::read_excel(..., skip = 12, ....)
Upvotes: 1