kLoad: Load and Assign an R Object

Description Usage Arguments Details Value See Also Examples

View source: R/misc.R

Description

The regular load function keeps the old variable name used when saving that object. Often, we would prefer to assign the loaded object to a new variable name. Hence, this function.

Usage

1
2
3

Arguments

...

args to pass to load

Details

If multiple arguments are supplied, they will be concatenated through file.path.

Value

the object stored in the load-ed object

See Also

load

Examples

1
2
3
4
5
6
dat <- data.frame( x = c(1,2,3), y=c('a','b','c') )
save( dat, file="dat.rda" )
rm( dat )
my_data <- kLoad( "dat.rda" )
## we protect ourselves from 'forgetting' the name of the
## object we saved

Kmisc documentation built on May 29, 2017, 1:43 p.m.

Related to kLoad in Kmisc...