4
I’m trying to piece together several xlsx files in R. For this, first I open the following libraries and use the programming:
library(readxl)
library(plyr)
larquivos<-list.files("C:\\Users\\tomas.veiga\\Documents\\Financeiro\\dados",full.names=TRUE)
arquivos <- lapply(larquivos, function(x) read_excel(path = x, sheet = 1))
As the files have difference in number of lines, I try to do the following:
extracontab<-data.frame(rbind.fill(arquivos[c(1:12)]))
But a mistake comes back:
Error in vector(type, length) : vector: cannot make a vector of mode 'NULL'.
I try to do it this way too:
extracontab<-data.frame(rbind.fill(arquivos[c(1:12)]))
But nothing works. What should I do? Thank you.
Is there any way to get a reproducible example of the data as the same problem? I tried here with any tables and the line
extracontab<-data.frame(rbind.fill(arquivos[c(1:12)]))
works normally (despite the[c(1:12]
redundant). This indicates that possibly the files were not read correctly, or else the problem has to do with the structure of the tables.– Luiz Rodrigo
The same thing happened to me.
– Marcus Nunes