load_as: Reload a single object written with the function save

Description Usage Arguments Value Author(s) See Also Examples

Description

load_as reloads the contents of a single object that was saved in .Rdata format into the workspace

Usage

1

Arguments

file

character file name of the stored object to reload

Value

character

Author(s)

Thomas P. Harte

See Also

load, save

Examples

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
file<- paste(tempfile(), ".Rdata", sep="")
objectWithAVeryStrangeName<- rnorm(10)
whos()
save(objectWithAVeryStrangeName, file=file)
## not run:
## load(file)
## loads objWithAVeryStrangeName into the workspace which may be undesirable
x<- load_as(file)
whos()
unlink(file)

tharte/tutils documentation built on Feb. 11, 2020, 9:17 a.m.