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

find_in_path

Find a module’s source location


Description

Find a module’s source location

Usage

find_in_path(spec, base_paths)

Arguments

spec

a mod_spec.

base_paths

a character vector of paths to search the module in, in order of preference.

Details

A module is physically represented in the file system either by ‘‹spec_name(spec)›.r’ or by ‘‹spec_name(spec)›/__init__.r’, in that order of preference in case both exist. File extensions are case insensitive to allow for R’s obsession with capital-R extensions (but lower-case are given preference, and upper-case file extensions are discouraged).

Value

find_in_path returns a mod_info that specifies the module source location.


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.