Become an expert in R — Interactive courses, Cheat Sheets, certificates and more!
Get Started for Free

load2

Load RData file and return objects in it.


Description

Load RData file and return objects in it.

Usage

load2(file, parts, simplify = TRUE, envir, impute)

Arguments

file

[character(1)]
File to load.

parts

[character]
Elements in file to load. Default is all.

simplify

[logical(1)]
If TRUE, a list is only returned if parts and the file contain both more than 1 element, otherwise the element is directly returned. Default is TRUE.

envir

[environment(1)]
Assign objects to this environment. Default is not to assign.

impute

[ANY]
If file does not exists, return impute instead. Default is missing which will result in an exception if file is not found.

Value

Either a single object or a list.

Examples

fn = tempfile()
save2(file = fn, a = 1, b = 2, c = 3)
load2(fn, parts = "a")
load2(fn, parts = c("a", "c"))

BBmisc

Miscellaneous Helper Functions for B. Bischl

v1.11
BSD_2_clause + file LICENSE
Authors
Bernd Bischl [aut, cre], Michel Lang [aut], Jakob Bossek [aut], Daniel Horn [aut], Jakob Richter [aut], Dirk Surmann [aut]
Initial release

We don't support your browser anymore

Please choose more modern alternatives, such as Google Chrome or Mozilla Firefox.