I normally keep different parts of the analysis in different scripts, for example, one for data formatting / preprocessing functions, another for some analytical functions, other for the plots functions. Then I have an Rmd file to work wiith the data ina similar way as mentioned by @nutterb
What I avod is using .RData for saving parts of it. Instead, I use .RDS format. Of course, carefully use or .RData may be suitable, but in the long run it may generate problems.
For example, you may want to load an old file in your current session to do some new stuff and compare with other stuff, and it may actually overwritte it. Working with .RDS files forces you to have to associate the file to a new object, and to give it an explicit name:
load('oldfile.Rdata') # it may load 'something' forgotten
## vs
oldfile <- readRDS('oldflie.RDS') # whatever it loads, it is associated with a new object
Also, assuming you are working mid/long term, your functions will also be improved with time. If you save some sessions (the full workspace) long time ago, and then you load them into a current one, it may overwrite the current functions with the old versions.
Of course, this can be avoided with some care, but I feel the RDS strategy as a safer one