Skip to content
Related Articles
Get the best out of our app
GFG App
Open App
geeksforgeeks
Browser
Continue

Related Articles

Check if the Argument is a Name in R Programming – is.name() Function

Improve Article
Save Article
Like Article
Improve Article
Save Article
Like Article

is.name() function in R Language is used to return TRUE if the argument is name else returns FALSE. The is.name() and is.symbol() functions are identical.

Syntax: is.name(x)

Parameters:
x: R object to be tested

Example 1:




# R program to illustrate
# is.name() function
  
# Initializing a string
x <- "sample"
  
# Calling the is.name() function
# to check whether the argument is
# name or not
is.name(x)


Output:

[1] FALSE

Example 2:




# R program to illustrate
# is.name() function
  
# Coercing the argument to a name
x <- as.name("sample")
  
# Calling the is.name() function
# to check whether the argument is
# name or not
is.name(x)


Output:

[1] TRUE
My Personal Notes arrow_drop_up
Last Updated : 19 Jun, 2020
Like Article
Save Article
Similar Reads