0

I've browsed and browsed but cant seem to find a solution on here that fits my case. I have an Excel file with 4 tabs. Each tab is formatted exactly the same- 2 columns and 12 rows (including headers). The columns headers are all titled as "Slow Times" and "Fast Times", respectively, then contain some numbers. I've been able to load the excel file and see that the tabs are also imported, but I'm unsure how to reference each tab once they're loaded. So far I have:

sheets <- excel_sheets("mydata.xlsx")

list_all <- lapply(sheets, function(x) read_excel("mydata.xlsx", sheet = x))

list_all
Brian Tompsett - 汤莱恩
  • 5,753
  • 72
  • 57
  • 129
  • you can try `list_all[['specific_tab']]` to reference an specific excel tab – AlSub Jul 28 '21 at 01:00
  • Does this answer your question? [How do I make a list of data frames?](https://stackoverflow.com/questions/17499013/how-do-i-make-a-list-of-data-frames) – AlSub Jul 28 '21 at 01:04
  • Im afraid that article doesnt help me! I am still confused how I can reference the data and run summary statistics on it. In Excel the tabs are titled setA, setB, setC, setD. However, when I load the file and look at it in R the tabs appear to be brought in as "[[1]], [[2]], [[3]], [[4]]". So how do i reference each work with them further? Thanks! – RyanWilliams Jul 28 '21 at 01:11

0 Answers0