Home

loadmydataRData

loadmydataRData is a utility function used in the R programming language to load data objects stored in a .RData file. It is designed to simplify importing multiple variables from a single file and to return the data in a structured form rather than scattering objects in the global environment.

When called, the function loads all objects contained in the file into a target environment. It can

Typical usage: loadmydataRData(file, envir = .GlobalEnv, as_list = FALSE, prefix = NULL). If as_list is TRUE, a list of

Advantages and limitations: Advantages include reduced boilerplate, improved reproducibility, and easier isolation of loaded data. Limitations

See also: load, readRDS, attach. References: documentation of base R's load function, and related data-loading utilities

return
a
named
list
of
the
loaded
objects,
preserving
object
names
and
attributes.
It
can
optionally
prefix
loaded
names,
or
load
directly
into
a
user-specified
environment.
objects
is
returned;
otherwise
the
objects
are
created
in
envir
with
their
original
names.
The
function
relies
on
base
R's
load()
under
the
hood
but
adds
convenience
options
for
organization.
include
possible
name
conflicts,
memory
usage
for
large
files,
and
the
fact
that
the
function
does
not
transform
data
beyond
loading;
users
must
perform
cleaning
or
transformation
after
loading.
in
common
R
packages.