Hi, I want to print out every file contents of either .csv/.tsv of folders, I made a code but it only does it for the first file, the rest generates a 0x0 table and would like to know what's messing it up.
##Directory Tree
dataPath <- "F:/Server/Ref"
tblFile <-
list.files(path = paste(dataPath, "Pool", sep = "/"),
#recursive = TRUE,
pattern = "*.[ct]sv",
full.names = TRUE) %>%
data.frame()
##File Content
for (i in 1:nrow(tblFile[1])){
print(assign(paste("", tblFile[1, i]), tblFile[1, i] %>%
map_df(read.table, header = FALSE, fill = TRUE) %>%
#map_df(~fread(.), header = FALSE, fill = TRUE) %>%
data.frame()))
}