findElement
does a fuzzy search for an element model, using
agrep()
. The output (if any) is in the form of suggested calls
to element-creating functions
anchor()
, chain()
, connector()
, float()
, instrument()
, misc()
and wire()
.
The list is in alphabetical order, not the order of the closeness of the match.
findElement(
e,
search = c("anchor", "chain", "connector", "float", "instrument", "wire"),
ignore.case = TRUE,
max.distance = 0.1
)
character value to be used for the fuzzy match, passed on to agrep()
.
character vector holding the categories to be searched for.
logical value, passed to agrep()
. The default is to ignore case.
numeric value, passed to agrep()
. The default usually catches
relevant cases; see the documentation for agrep()
for the (somewhat subtle) meaning
of this argument.
findElement
returns (silently) a list of the suggested function calls.
findElement
is used by e.g. float("?BUB")
.