-
Notifications
You must be signed in to change notification settings - Fork 0
/
saving_R_objects.Rmd
21 lines (15 loc) · 1.15 KB
/
saving_R_objects.Rmd
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
#### 1.18 Saving and Loading R Data Objects
In situations where a good deal of processing must be used on a raw dataset in order to prepare
it for analysis, it may be prudent to save the R objects you create in their internal binary form.
One attractive feature of this scheme is that the objects created can be read by R programs
running on different computer architectures than the one on which they were created, making it
very easy to move your data between different computers. Each time an R session is completed,
you are prompted to save the workspace image, which is a binary file called .RData in the
working directory.
<p>
Whenever R encounters such a file in the working directory at the beginning of a session,
it automatically loads it making all your saved objects available again. So one method for
saving your work is to always save your workspace image at the end of an R session. If you
would like to save your workspace image at some other time during your R session, you can use
the save.image() function, which, when called with no arguments, will also save the current
workspace to a file called .RData in the working directory.