I have 500 files (saved in the same directory).
All these files have the same format, as follows. Although excel can recognize them having 3 columns, R only reads one column if I use x <- read.csv(xxx.txt, header=T)
. I guess there is a smarter way of doing this.
4077 40770 3.083
4078 40780 2.985
4079 40790 2.946
4080 40800 3.010
4081 40810 2.956
4082 40820 3.080
4083 40830 3.130
4084 40840 3.167
4085 40850 3.054
After loading all these files to R, I want to extract only 0, 100th, 200th, 300th,....9000th rows and save them in another directory with the same file name in 500 separated files.
Is it possible to be done automatically with R?