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

file

Find the full file names of files in modules


Description

Find the full file names of files in modules

Usage

file(..., module = current_mod())

Arguments

...

character vectors of files or subdirectories inside a module; if none is given, return the root directory of the module

module

a module environment (default: current module)

Value

A character vector containing the absolute paths to the files specified in ....

Note

If called from outside a module, the current working directory is used.

This function is similar to system.file for packages. Its semantics differ in the presence of non-existent files: box::file always returns the requested paths, even for non-existent files; whereas system.file returns empty strings for non-existent files, or fails (if requested via the argument mustWork = TRUE).

See Also


box

Write Reusable, Composable and Modular R Code

v1.0.2
MIT + file LICENSE
Authors
Konrad Rudolph [aut, cre] (<https://orcid.org/0000-0002-9866-7051>), Michael Schubert [ctb] (<https://orcid.org/0000-0002-6862-5221>)
Initial release

We don't support your browser anymore

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