syberia_data_sources: Find all the data sources in a Syberia project.

Description Usage Arguments Details Value See Also

View source: R/traversal.r

Description

The convention is that data source files have the same name as the directory they are contained in (this allows other files in the same directory to be used as helper files). If no such file exists in a directory, all files are assumed to be data source files. For example, if we have

Usage

1
2
syberia_data_sources(pattern = "", type = "sources",
  root = syberia_root(), by_mtime = TRUE, fixed = FALSE)

Arguments

pattern

character. A set of characters by which to filter. This uses the same format as the popular ctrl+p plugin for vim. Namely, it will look for adjacent instances of such characters regardless of any interpolating characters. For example, 'ace' will match 'abcde' but also 'abcdfghe' but not 'aebcd'.

type

character. This can be either "sources" or "test". The default is the former, whereas the latter will fetch data source tests.

root

character. The root of the syberia project. The default is syberia_root().

by_mtime

logical. Whether or not to sort the data sources in descending order by last modified time. The default is TRUE.

fixed

logical. Whether or not to use smart interpolation, like in the description for the pattern argument. If TRUE, only substring matching is used.

Details

some_data_type/data_source1.r some_data_type/data_source2/data_source2.r some_data_type/data_source2/helpers.r

only the first two will be considered to be data sources. If there was a some_data_type/some_data_type.r, then the first would no longer be considered a model object (it would be considered a file with helper functions).

Value

a list of filenames containing syberia data sources

See Also

syberia_root


robertzk/syberiaStructure documentation built on May 27, 2019, 11:38 a.m.