load_any {tor} | R Documentation |
Import multiple files of any format from a directory into an environment.
Description
Import multiple files of any format from a directory into an environment.
Usage
load_any(
path = ".",
.f,
regexp = NULL,
ignore.case = FALSE,
invert = FALSE,
envir = .GlobalEnv,
...
)
Arguments
path |
A character vector of one path. Defaults to the working directory. |
.f |
A function able to read the desired file format. |
regexp |
A regular expression (e.g. |
ignore.case |
if |
invert |
If |
envir |
an |
... |
Additional arguments passed to |
Value
invisible(path)
.
See Also
Other functions to import files into an environment:
load_csv()
Other functions to import files of any format:
list_any()
Examples
e <- new.env()
load_any(tor_example("rdata"), .f = ~ get(load(.x)), envir = e)
ls(e)
# The data is now available in the environment `e`
e$rdata1
e$rdata2
[Package tor version 1.1.3 Index]