syberia_models: Find all the model objects in a Syberia project.

Description Usage Arguments Details Value See Also

View source: R/traversal.r

Description

The convention is that model 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 model files. For example, if we have

Usage

1
2
syberia_models(pattern = "", env = c("dev", "prod"),
  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'.

env

character. The syberia environment (e.g., 'dev' or 'prod'. The default is c('dev', 'prod').

root

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

by_mtime

logical. Whether or not to sort the models 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

default/en-US/model1.r default/en-US/model2/model2.r default/en-US/model2/helper.r

only the first two will be considered to be model objects. If there was a default/en-US/en-US.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 models

See Also

syberia_root


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