I have 12 csv files in one folder, and try to import combine it into 1 single file. Currently i use this code:
allFileNames <- list.files("AllData")
for (filename in allFileNames) {
fullFilename <- paste0("AllData/", filename)
data <- read.csv(fullFilename,
skip=2,
na.strings="<1")
data[is.na(data)] <- 0
names(data) <- c("x","y","z")
data <- rbind(data,deparse.level = 0,make.row.names = TRUE,
stringsAsFactors = default.stringsAsFactors(),
factor.exclude = NA)
}
But it only shows 1 file instead of combine all 12 files. In which part did i do wrong?