Become an expert in R — Interactive courses, Cheat Sheets, certificates and more!
Get Started for Free

is_lang

Is object a call?


Description

Deprecated lifecycle

These functions are deprecated, please use is_call() and its n argument instead.

Usage

is_lang(x, name = NULL, n = NULL, ns = NULL)

is_unary_lang(x, name = NULL, ns = NULL)

is_binary_lang(x, name = NULL, ns = NULL)

quo_is_lang(quo)

Arguments

x

An object to test. If a formula, the right-hand side is extracted.

name

An optional name that the call should match. It is passed to sym() before matching. This argument is vectorised and you can supply a vector of names to match. In this case, is_call() returns TRUE if at least one name matches.

n

An optional number of arguments that the call should match.

ns

The namespace of the call. If NULL, the namespace doesn't participate in the pattern-matching. If an empty string "" and x is a namespaced call, is_call() returns FALSE. If any other string, is_call() checks that x is namespaced within ns.

Can be a character vector of namespaces, in which case the call has to match at least one of them, otherwise is_call() returns FALSE.

quo

A quosure to test.


rlang

Functions for Base Types and Core R and 'Tidyverse' Features

v0.4.11
MIT + file LICENSE
Authors
Lionel Henry [aut, cre], Hadley Wickham [aut], mikefc [cph] (Hash implementation based on Mike's xxhashlite), Yann Collet [cph] (Author of the embedded xxHash library), RStudio [cph]
Initial release

We don't support your browser anymore

Please choose more modern alternatives, such as Google Chrome or Mozilla Firefox.