I am having trouble uploading sheets from my excel file into R. I followed another code I saw on how to read multiple sheets at once. The code I have used:
sheets <- read_xl::excel_sheets(filename.xlsx)
x <- lapply(sheets, function(x) read_xl::read_excel(filename.xlsx, sheet = x))
if(!tibble) x <- lapply(x, as.data.frame)
names(x) <- sheets
x
}
when i try to then run the following line of code:
mysheets <- read_xl_all_sheets("filename.xlsx")
I get: Error in loadNamespace(x) : there is no package called ‘read_xl’
I have installed dplyr and called readxl from the library
What could be going wrong here?