Saving R objects

Added saving and R object.