is_symbol: Is Object a Symbol?

View source: R/is.R

is_symbolR Documentation

Is Object a Symbol?

Description

This function checks whether the x argument is an rstatic Symbol. The optional second argument can be used to check for a specific name.

Usage

is_symbol(x, name = NA_character_, ssa = TRUE)

Arguments

x

The object to check.

name

(character) A name to compare against, or NA to skip checking the name (the default).

Value

A logical value: is x a Symbol, and does it match the name argument?

Examples

x = quote_ast(hi)
is_symbol(x) # TRUE
is_symbol(x, "hi") # TRUE
is_symbol(x, "hello") # FALSE

nick-ulle/ast documentation built on May 14, 2024, 7:40 p.m.