R: Use Regex to Import Specific Sheets from Multiple Excel Files
问题 I have a group of Excel files with multiple sheets which don’t follow a standard naming convention. I want to create a single data frame from specific sheets containing the keyword 'frame' . library(tidyverse) library(openxlsx) # Sample Excel File 1 df1 <- data.frame(replicate(10,sample(0:1,10,rep=TRUE))) data_frame2 <- data.frame(replicate(10,sample(0:1,10,rep=TRUE))) list_of_datasets1 <- list("df" = df1, "date_frame" = data_frame2) write.xlsx(list_of_datasets1, file = "writeXLSX1.xlsx") #