1. download the code from git server http://smlg.fiu.edu/gitlab/qja0428/r_code/blob/master/data%20preparation.R
2. download all the data files to the same directory, and change them to csv format
3. open the code in R studio
4. In the code script line 3, set the data directory as working directory
5. in the code script line 83, set another directory as output directory
6. click run in R studio
7. you will find the output file as csv format in the directory you set in step 5.
By the way, I have tested a lot of cases, it works very good, but based on my experience, this kind of data files, don't have a standard format, so my code cannot consider every exception case, so I really recommend you figure out how this code works, and then you can debug when something unusual happens!