resave | R Documentation |
.Rdata
- type file.
Take an existing myfile.Rdata
data file and add the specified objects to it. This is achieved by opening the data file in a local environment, "dumping" the new objects into that environment, and re-saving everything to the same file name.
resave(..., list = character(), file, overwrite = TRUE, loadverbose = FALSE )
... |
Names of objects to save. Same usage as in |
list |
A list of names of the objects to save. Can be used with or without any named arguments in |
file |
The name of the file to open and add items to. |
overwrite |
If TRUE (the default), items currently in the selected file will be overwritten with items of the same name in the console environment. If FALSE, they will not be overwritten; a warning message will be issued. |
loadverbose |
Default is FALSE. If TRUE, then the names of all objects currently in the file are echoed to the console |
Nothing is returned. This function is used solely to put objects into the file.
Code is essentially the same as that provided by "flodel" on StackOverflow, with some enhancements based on "save_append" by "nehartj" on GitHub
Carl Witthoft carl@witthoft.com
lsdata
, save
, load
## not run to avoid creating detritus
# foo<-1:4
# bar<-5:8
# save(foo,file='foo.Rdata')
# resave(bar,file='foo.Rdata')
# #check your work
# lsdata('foo.Rdata')
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.