Ian Evans
2014-Dec-17 22:27 UTC
[R] Help: The Difference Between Workspace, Script, and History
I apologize that I am very new to R and programming in general. I do not understand the difference between the script, the workspace, and the history, and what saving each one means. I seem to be doing fine writing commands and going through lessons and examples (I'm using Learn R in a Day) but when I try to save what I wrote and load it later, it tells me that it is loaded, but none of my code is one the screen. [[alternative HTML version deleted]]
Clint Bowman
2014-Dec-18 00:00 UTC
[R] Help: The Difference Between Workspace, Script, and History
Ian, ls() is your friend. To learn more about ls(), type ?ls Clint Clint Bowman INTERNET: clint at ecy.wa.gov Air Quality Modeler INTERNET: clint at math.utah.edu Department of Ecology VOICE: (360) 407-6815 PO Box 47600 FAX: (360) 407-7534 Olympia, WA 98504-7600 USPS: PO Box 47600, Olympia, WA 98504-7600 Parcels: 300 Desmond Drive, Lacey, WA 98503-1274 On Wed, 17 Dec 2014, Ian Evans wrote:> I apologize that I am very new to R and programming in general. I do not > understand the difference between the script, the workspace, and the > history, and what saving each one means. > > I seem to be doing fine writing commands and going through lessons and > examples (I'm using Learn R in a Day) but when I try to save what I wrote > and load it later, it tells me that it is loaded, but none of my code is > one the screen. > > [[alternative HTML version deleted]] > > ______________________________________________ > R-help at r-project.org mailing list -- To UNSUBSCRIBE and more, see > 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. >
Bert Gunter
2014-Dec-18 00:06 UTC
[R] Help: The Difference Between Workspace, Script, and History
I can answer, but I think you'll get a better one if you tell us the environment in which you're working -- RStudio, R's GUI, Rterm,... and the platform (Windows, MAC, _nix). Very briefly, but perhaps inadequately, the script is what you write and send to R to execute or perhaps store in its workspace to be run later (e.g. functions, data); the workspace is the "container" where R stores its objects -- functions, variables, data, etc. -- that your script puts there and that R loads by default; and history is simply a record of the command that you sent to R to run. I suggest that you have a look at "An Introduction to R" for a better description of how things work than your current tutorial apparently gives. Cheers, Bert Bert Gunter Genentech Nonclinical Biostatistics (650) 467-7374 "Data is not information. Information is not knowledge. And knowledge is certainly not wisdom." Clifford Stoll On Wed, Dec 17, 2014 at 2:27 PM, Ian Evans <ievans272 at gmail.com> wrote:> I apologize that I am very new to R and programming in general. I do not > understand the difference between the script, the workspace, and the > history, and what saving each one means. > > I seem to be doing fine writing commands and going through lessons and > examples (I'm using Learn R in a Day) but when I try to save what I wrote > and load it later, it tells me that it is loaded, but none of my code is > one the screen. > > [[alternative HTML version deleted]] > > ______________________________________________ > R-help at r-project.org mailing list -- To UNSUBSCRIBE and more, see > 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.