load_rdata: Loading .RData Files Allowing Assignment To An Variable

Description Usage Arguments Value Examples

Description

save() allows saving multiple R objects from the environment for later use. One caveat of its default behavior is that when the .RData file is loaded, it retains its variable name, which could collide with something else that is already in the environment. load_rdata() loads .RData to the function environment, makes sure their is only one object loaded, and return it to allow assignment to another variable name upon loading.

Usage

1

Arguments

file

a character string specifying the path of the desired Rdata file

Value

an R object

Examples

1
2
3
temprdata <- tempfile(fileext = ".rData")
save(iris, file = temprdata)
iris_reload <- load_rdata(file = temprdata)

chenyenchung/genofeatutil documentation built on May 15, 2019, 10:38 p.m.