is_symbol: Is Object a Symbol?

Description Usage Arguments Value Examples

View source: R/is.R

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

1

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

1
2
3
4
x = quote_ast(hi)
is_symbol(x) # TRUE
is_symbol(x, "hi") # TRUE
is_symbol(x, "hello") # FALSE

nick-ulle/ast documentation built on Oct. 18, 2019, 4:37 a.m.