rda: Check Existence, Read, Save and Rename .rda Files and their...

Description Usage Arguments Value Author(s) See Also

Description

Check Existence, Read, Save and Rename .rda Files and their Objects.

Usage

1
2
3
4
5
6
exists_rda(file, names, package = NULL)
read_rda(file, names, package = NULL)
save_rda(..., file, names = NULL)
rename_rda(oldname, oldfile = paste0(oldname, collapse = "_"),
           newname, newfile = paste0(newname, collapse = "_", ".rda"),
	   package = NULL)

Arguments

file
exists_rda()

character string (with or without ending .rda) specifying the name of the file to check existence of (if pacakge = NULL) or in (otherwise).

read_rda()

character string (with or without ending .rda) specifying the file to read from.

save_rda()

character string (with or without ending .rda) specifying the file to save to.

names
exists_rda()

character vector of names of objects to be checked for existence.

read_rda()

character vector of names of objects to be read. If not provided, a name is constructed from file.

save_rda()

character vector of names under which the objects in ... are saved in file. If NULL, the names of the objects provided by ... are taken as default values.

package
exists_rda()

package name in which to check or NULL (the default) in which case the current working directory is checked.

read_rda(), rename_rda()

package name from which to load the objects or NULL (the default) in which case the current working directory is searched.

...

any number of R objects.

oldname

character string specifying the object to be read.

oldfile

file name (with or without ending .rda) specifying from which the object named oldname is read.

newname

character string specifying the new name under which the object is to be saved.

newfile

file name (with ending .rda) specifying where the object named oldname is saved under the name newname.

Value

exists_rda()

logical indicating whether the .rda file file exists (if names is not provided) or whether the objects with names names exist inside file (if names is provided).

read_rda()

the object read from the .rda.

save_rda()

nothing (generated an .rda by side-effect).

rename_rda()

nothing (generated an .rda by side-effect).

Author(s)

Marius Hofert

See Also

See the underlying functions load(), data() and save() (among others).


gnn documentation built on March 13, 2020, 5:07 p.m.

Related to rda in gnn...