miceadds (version 3.11-6)

load.Rdata: R Utilities: Loading Rdata Files in a Convenient Way

Description

These functions loads a Rdata object saved as a data frame or a matrix in the current R environment. The function load.Rdata saves the loaded object in the global environment while load.Rdata2 loads the object only specified environments. Hence, usage of load.Rdata2 instead of load.Rdata is recommended.

Usage

load.Rdata(filename, objname)

load.Rdata2(filename, path=getwd())

Arguments

filename

Rdata file (matrix or data frame)

objname

Object name. This object will be a global variable in R.

path

Directory from which the dataset should be loaded

See Also

See also save.Rdata for saving data frames in a Rdata format.

See also: base::load, base::save

Examples

Run this code
# NOT RUN {
# load a data frame in the file "data_s3.Rdata" and save this
# as the object "dat.s3"
load.Rdata( filename="data_s3.Rdata", "dat.s3" )
head(dat.s3)

# Alternatively one can use the function
dat.s3 <- miceadds::load.Rdata2( filename="data_s3.Rdata")
# }

Run the code above in your browser using DataCamp Workspace