Entering edit mode
10.0 years ago
viniciushs88
▴
50
I would to apply a loop in R to process several files, one file per time. The files have exactly the same pattern, just the string "...split1..." is a crescent number to my files. Then a have files like "...split1...", "...split2..." ... "...split777...". I want output files like in the same logic, in the example: "newsplit1.txt", "newsplit2.txt" ... "newsplit777.txt".
all <- read.table("nsamplescluster.split1.adjusted", header=TRUE, sep=";") all <- all[, -grep("GType", colnames(all))] write.table(all, "newsplit1.txt", sep=";")
Cheers!