Learn R Programming

GWASTools (version 1.18.0)

saveas: Save an R object with a new name

Description

Saves an R object as name in an Rdata file called path/name.RData.

Usage

saveas(obj, name, path=".")

Arguments

obj
R object to save
name
character string with the new name for the R object
path
path for the Rdata file (saved file will be path/name.RData)

Details

The suffix ".RData" will be appended to the new object name to create the file name, and the file will be written to the path directory.

See Also

getobj

Examples

Run this code
x <- 1:10
path <- tempdir()
saveas(x, "myx", path)
newfile <- paste(path, "/myx", ".RData", sep="")
load(newfile) # myx now loaded
unlink(newfile)

Run the code above in your browser using DataLab