Check for Presence of Common Elements between Objects in R Programming - is.element() Function Last Updated : 15 Jun, 2020 Comments Improve Suggest changes Like Article Like Report is.element() function in R Language is used to check if elements of first Objects are present in second Object or not. It returns TRUE for each equal value. Syntax: is.element(x, y) Parameters: x and y: Objects with sequence of items Example 1: Python3 1== # R program to illustrate # the use of is.element() function # Vector 1 x1 <- c(1, 2, 3) # Vector 2 x2 <- c(1:6) # Calling is.element() Function is.element(x1, x2) is.element(x2, x1) Output: [1] TRUE TRUE TRUE [1] TRUE TRUE TRUE FALSE FALSE FALSE Example 2: Python3 1== # R program to illustrate # the use of is.element() function # Data frame 1 data_x <- data.frame(x1 = c(5, 3, 7), x2 = c(1, 4, 2)) # Data frame 2 data_y <- data.frame(y1 = c(2, 3, 4), y2 = c(1, 4, 2), y3 = c(3, 4, 5)) # Calling is.element() Function is.element(data_x, data_y) is.element(data_y, data_x) Output: [1] FALSE TRUE [1] FALSE TRUE FALSE Comment More infoAdvertise with us Next Article Check for Presence of Common Elements between Objects in R Programming - is.element() Function N nidhi_biet Follow Improve Article Tags : R Language R DataFrame-Function R Vector-Function R Object-Function R Matrix-Function R Array-Functions +2 More Similar Reads Check if an Object is of Complex Data Type in R Programming - is.complex() Function is.complex() function in R Language is used to check if the object passed to it as argument is of complex data type. Syntax: is.complex(x) Parameters: x: Object to be checked Example 1: Python3 # R program to check if # object is of complex type # Calling is.complex() function is.complex(1 + 0i) is. 1 min read Check for the Existence of a Vector Object in R Programming - is.vector() Function is.vector() function in R Language is used to return TRUE if the given vector is of the specified mode having no attributes other than names. It returns FALSE otherwise. Syntax: is.vector(x, mode = "any") Parameters: x: R object mode: character string naming an atomic mode or "list" or "expression" 1 min read Get Exclusive Elements between Two Objects in R Programming - setdiff() Function setdiff() function in R Programming Language is used to find the elements which are in the first Object but not in the second Object. Syntax: setdiff(x, y) Parameters: x and y: Objects with sequence of itemsR - setdiff() Function ExampleExample 1: Apply setdiff to Numeric Vectors in R LanguageR # R 2 min read Check if an Object is an Expression in R Programming - is.expression() Function is.expression() function in R Language is used to check if the object passed to it as argument is of the expression class. Syntax: is.expression(object) Parameters: object: Object to be checked Example 1: Python3 1== # R program to check if # an object is an expression # Creating an object x <- 1 min read Check if the Object is a Data Frame in R Programming - is.data.frame() Function is.data.frame() function in R Language is used to return TRUE if the specified data type is a data frame else return FALSE. R data.frame is a powerful data type, especially when processing table (.csv). It can store the data as row and columns according to the table. Syntax: is.data.frame(x) Paramet 1 min read Check if a Factor is an Ordered Factor in R Programming - is.ordered() Function is.ordered() function in R Programming Language is used to check if the passed factor is an ordered factor. Syntax: is.ordered(factor) Parameters: factor: Factor to be checkedis.ordered() Function in R Programming ExampleExample 1: Demonestration of R - is.ordered() Function R # Creating a vector x 1 min read Check if an Object of the Specified Name is Defined or not in R Programming - exists() Function exists() function in R Programming Language is used to check if an object with the names specified in the argument of the function is defined or not. It returns TRUE if the object is found.Syntax: exists(name)Parameters: name: Name of the Object to be searchedExample 1: Apply exists() Function to va 2 min read Compare two Objects for Equality in R Programming - identical() Function identical() function in R Language is used to return TRUE when two objects are equal else return FALSE. Syntax: identical(a, b)Parameters: a, b: specified two objects  Example 1:  Python3 # R program to illustrate # identical function # Calling the identical() function identical(factorial(3), gamm 2 min read Checking if the Object is a Factor in R Programming - is.factor() Function is.factor() function in R Language is used to check if the object passed to the function is a Factor or not. It returns a boolean value as output. Syntax: is.factor(Object) Parameters: Object: Object to be checked Example 1: Python3 1== # Creating a vector x<-c("female", "male 1 min read Like