ECON 413
R Best Practices
Erol Taymaz
Department of Economics
Middle East Technical University
Root directory
/R
/data
/img
/presentations
/etc
Use relative file address
Use updated packages - check for updates
Use vectorization
Review and test your code
Errors should be raised using stop() function
Remove temporary objects
Write functions
Time the code (if a part takes a lot of time to execute)
Do not save the workspace
Use version control (git)
Share your code (github)
Cite others