在线时间:8:00-16:00
迪恩网络APP
随时随地掌握行业动态
扫描二维码
关注迪恩网络微信公众号
Argument Verification Using Partial Matching match.arg matches arg against a table of candidate values as specified by choices, where NULL means to take the first one.
Usagematch.arg(arg, choices, several.ok = FALSE) Argumentsarg a character vector (of length one unless several.ok is TRUE) or NULL. choices a character vector of candidate values several.ok logical specifying if arg should be allowed to have more than one element. DetailsIn the one-argument form match.arg(arg), the choices are obtained from a default setting for the formal argument arg of the function from which match.arg was called. (Since default argument matching will set arg to choices, this is allowed as an exception to the ‘length one unless several.ok is TRUE’ rule, and returns the first element.)
ValueThe unabbreviated version of the exact or unique partial match if there is one; otherwise, an error is signalled if several.ok is false, as per default. When several.ok is true and more than one element of arg has a match, all unabbreviated versions of matches are returned. See Alsopmatch, match.fun, match.call. Examples
|
请发表评论