Hi, I have a following problem:
I have a list that includes several dataframes. I would like to read each of them using for loop.
See bellow:
file.list <- list.files(pattern='*.xls.*', recursive = TRUE)
df.list_excel <- lapply(file.list, read_excel)
for(i in 1:length(df.list_excel)) {
name = paste0("file_", i)
name <- df.list_excel[[i]]
}
Because length(df.list_excel) = 13, I would like to have data frames called file_1, ..., file_13 imported. My loop opens only last df and call it "name", not file_13.
What do I do wrong, please?