【发布时间】:2021-06-02 14:00:14
【问题描述】:
我想根据特定模式为每个子目录阅读包含单词“全部”或“全部”的 Excel 工作簿的工作表。
我试过list.files() ,但它不能正常工作。
files_to_read = list.files(
path = common_path, # directory to search within
pattern = "X - GEN", # regex pattern, some explanation below
recursive = TRUE, # search subdirectories
full.names = TRUE # return the full path
)
data_lst = lapply(files_to_read, read.xlsx)
【问题讨论】: