resave: Update or append objects to '.RData' file

Description Usage Arguments Value Note Author(s) See Also Examples

Description

Function for appending or updating objects to an existing .RData file. resave updates existing objects in an .RData file. If the resaved objects do not exist in the file, the objects are added to the file. If the file does not exist, resave functions as save.

Usage

1

Arguments

...

The objects to be saved, appended or overwritten.

list

A character of the names to be resaved.

file

A character of length 1 giving the path and .RData file to resave the objects into.

Value

Returns nothing. If .RData-file specified by file does not exist resave functions exactly as save and creates a new file. If it does exist the file is overwritten with the updated objects.

Note

This is a modified version of a function created by user "flodel" at http://stackoverflow.com/questions/11813096/updating-an-existing-rdata-file

Author(s)

Anders Ellern Bilgrau <anders.ellern.bilgrau (at) gmail.com>

See Also

See Also: save, load

Examples

1
2
3
4
5
6
7
8
9
file <- file.path(tempdir(), "myFile.RData") # File
a <- list(LETTERS) 

resave(a, file = file)  # Save object "a"

b <- pi  # Create a new object "b"
a <- c(a, list(letters))  # Modify "a"

resave(a, b, file = file)  # Update a and add b

AEBilgrau/Bmisc documentation built on May 5, 2019, 11:28 a.m.