syberia_objects: Find all the syberia objects of the given type and subtype in...

Description Usage Arguments Details Value See Also

View source: R/traversal.r

Description

Syberia objects can refer to models, data sources, or tests. The essence of the idea is that the pattern parameter specifies a set of consecutive character by which to look for, and type specifies the subdirectory (an additional subdirectory of that directory can be set using the subtype parameter).

Usage

1
2
syberia_objects(pattern = "", base = 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'.

base

character. A subdirectory to look in. For example, type = file.path(syberia_root(), 'models') will look in the models subdirectory of the root directory of the currently active Syberia project, whereas the same with 'models/dev' will look in the models/dev subdirectory. 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

For example, if we are looking for models in the prod environment matching "gbm", we could try: syberia_objects('gbm', 'models', 'prod').

Note, however, that the first argument (pattern) does not look for a substring match, but an interpolated match: for example, looking for 'abc' will match "a1b2c" or "model_a/submodel_bc" but will not match "acb" or any string where the characters 'a', 'b', and 'c' do not appear consecutively (with arbitrary strings in between them).

Value

a list of filenames containing syberia objects

See Also

syberia_models


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