SaveAs: Saves an R Object Under a Different Name

View source: R/DescTools.r

SaveAsR Documentation

Saves an R Object Under a Different Name

Description

An R object cannot be saved in binary mode under a different name using the default save() function. SaveAs() extends the save function for this option.

Usage

SaveAs(x, objectname, file, ...)

Arguments

x

the object to save

objectname

the new name for the object.

file

a (writable binary-mode) connection or the name of the file where the data will be saved (when tilde expansion is done).

...

the dots are passed to the save function.

Author(s)

Andri Signorell <andri@signorell.net>

See Also

save

Examples

x <- stats::runif(20)
SaveAs(x=x, objectname="NewX", file = "NewXFile.rda")
unlink("NewXFile.rda")

AndriSignorell/DescTools documentation built on April 13, 2024, 6:33 a.m.