Для write_xlsx
из writexl
аргумент file
отсутствует.Это path
аргумент
library(writexl)
lapply(names(list.df),
function (x) write_xlsx(list.df[[x]], path=paste(x, "xlsx", sep=".")))
- выходной каталог с файлами
![enter image description here](https://i.stack.imgur.com/Bomem.png)
data
list.df <- list(A = structure(list(X1 = c("a", "d", "g", "j"), X2 = 1:4,
X3 = c("b", "e", "h", "k"), X4 = c("c", "f", "i", "l")),
class = "data.frame", row.names = c(NA,
-4L)), B = structure(list(X1 = c("a", "d", "g", "j"), X2 = c(1L,
2L, 2L, 3L), X3 = c("b", "e", "h", "k"), X4 = c("c", "f", "i",
"l")), class = "data.frame", row.names = c(NA, -4L)), C = structure(list(
X1 = c("a", "d", "g", "j"), X2 = 1:4, X3 = c("b", "e", "h",
"k"), X4 = c("c", "f", "i", "l")), class = "data.frame", row.names = c(NA,
-4L)))