Fitting

fit<-lm(y~x)

ore.save(fit, name='regression_fit', overwrite=TRUE)

ore.save() will store the R object 'fit' in the datastore with the name 'regression_fit'. overwrite is a logical value specifying whether to overwrite the datastore if it already exists; the default is FALSE.

The overwrite flag is set to true to make sure that ore.save() does not fail. This is one way of doing it; otherwise, the user's script should check for the existence of the datastore object.