parse_ellipsis: A non-standard evaluation parser for ellipses

parse_ellipsisR Documentation

A non-standard evaluation parser for ellipses

Description

This is a version of parse_levels() that supports ellipses. This is useful for specifying multiple parameters in one function. This function was specifically designed for a non-standard evaluation update to match_item().

Usage

parse_ellipsis(...)

Arguments

...

Variables and tolerances, in the form ⁠num_variable1 = -1:3, num_variable2 = -0.5:0.5, char_variable1⁠. Variables and tolerances should be separated by a =, and lower and upper boundaries of tolerances should be separated by :. Variables without tolerances are also supported (useful for character variables or matching by numeric variables exactly, i.e. shorthand for 0:0).

Value

Returns a list object in the form list(c("num_variable1", -1, 3), c("num_variable2", -0.5, 0.5), "char_variable1").

Examples


parse_ellipsis(substitute(c(Length = 0:0, Zipf.SUBTLEX_UK = -0.1:0.1, PoS.SUBTLEX_UK)))

parse_ellipsis(substitute(c(Length = 0:0,
                           Zipf.SUBTLEX_UK = -0.1:0.1,
                           PoS.SUBTLEX_UK,
                           BG.SUBTLEX_UK = -0.005:0.005)))


JackEdTaylor/LexOPS documentation built on Sept. 10, 2023, 3:09 a.m.