How to use r code file 'data preparation'

How to use r code file 'data preparation'

Postby qja0428 » Wed Jan 25, 2017 3:07 am

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!
qja0428
 
Posts: 18
Joined: Wed Jan 21, 2015 4:13 pm

Re: How to use r code file 'data preparation'

Postby vavec001 » Tue Feb 07, 2017 12:08 pm

Have been trying to run Jingan's code but still unsuccessful. First tried with my own dataset but then tried again with dataset set that was used in the example. Here are screenshots from R-Studio.

Input 1
Screenshot 2017-02-07 11.04.05.png
Screenshot 2017-02-07 11.04.05.png (152.27 KiB) Viewed 2403 times


Input 2
Screenshot 2017-02-07 11.04.18.png
Screenshot 2017-02-07 11.04.18.png (114.58 KiB) Viewed 2403 times


Output
Screenshot 2017-02-07 11.04.35.png
Screenshot 2017-02-07 11.04.35.png (68.44 KiB) Viewed 2403 times
vavec001
 
Posts: 34
Joined: Thu May 28, 2015 12:49 pm

Re: How to use r code file 'data preparation'

Postby cwyoo » Mon Feb 13, 2017 7:39 am

vavec001 wrote:Have been trying to run Jingan's code but still unsuccessful. First tried with my own dataset but then tried again with dataset set that was used in the example. Here are screenshots from R-Studio.

Input 1
Screenshot 2017-02-07 11.04.05.png


Input 2
Screenshot 2017-02-07 11.04.18.png


Output
Screenshot 2017-02-07 11.04.35.png


It seems you need to double check whether the file name and path is correct.
cwyoo
Site Admin
 
Posts: 377
Joined: Sun Jun 22, 2014 2:38 pm


Return to How to run scripts/programs

Who is online

Users browsing this forum: No registered users and 2 guests

cron