Organization and R

Date

6 September 2007

Topics
R

Many R users seem to get themselves in a bit of a mess with R files and workspaces scattered across different directories. The R files themselves also get messy and hard to follow. So here is some advice on keeping organized with R:

source("functions.R")
source("readdata.R")
source("fitmodel.R")

Then the whole project can be run by sourcing the main file. If you find an error in your data, or you get updated or revised data, it is then a simple matter of running  main.R and all the graphs and analysis will be re-created.