On Wed, Apr 24, 2013 at 4:08 PM, Liviu Andronic <landronim...@gmail.com> wrote: > Dear Duncan, > > > On Wed, Apr 24, 2013 at 3:03 PM, Duncan Murdoch > <murdoch.dun...@gmail.com> wrote: >> A better approach is to *never* save and load workspaces unless you know >> exactly what is in them. Always reply "no" to the question about saving >> your workspace (or set that as the default). If you accidentally end up >> with a workspace being loaded, delete it. >> > I must admit that I'm a bit surprised by this. I was always under the > impression that saving/restoring workspaces was the proper workflow in > R. If you use R interactively (e.g., not by running scripts), how else > would you store your data, intermediary results, etc., while working > on a project? Am I missing something?
I save the objects themselves (rather than the whole workspace) using saveRDS() and readRDS() -- which I *think* are considered better practice than save() and load() because they don't force names on you. Cheers, MW ______________________________________________ R-help@r-project.org mailing list https://stat.ethz.ch/mailman/listinfo/r-help PLEASE do read the posting guide http://www.R-project.org/posting-guide.html and provide commented, minimal, self-contained, reproducible code.