Checking if the Object is a Factor in R Programming - is.factor() Function Last Updated : 04 Jun, 2020 Comments Improve Suggest changes Like Article Like Report 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", "male", "female") # Converting the vector x into a factor named gender gender<-factor(x) # Using is.factor() Function is.factor(gender) Output: [1] TRUE Example 2: Python3 1== # Creating a vector x<-c("female", "male", "male", "female") # Converting the vector x into a factor named gender gender<-factor(x) # Using is.factor() Function is.factor(x) Output: [1] FALSE Comment More infoAdvertise with us Next Article Checking if the Object is a Factor in R Programming - is.factor() Function N nidhi_biet Follow Improve Article Tags : R Language R Factor-Function Similar Reads 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 the Object is a List in R Programming - is.list() Function is.list() function in R Language is used to return TRUE if the specified data is in the form of list, else returns FALSE. Syntax: is.list(X) Parameters: x: different types of data storage Example 1: Python3 # R program to illustrate # is.list function # Initializing some list a <- list(1, 2, 3) b 1 min read Check if an Object is of Type Character in R Programming - is.character() Function is.character() function in R Language is used to check if the object passed to it as argument is of character type. Syntax: is.character(x) Parameters: x: Object to be checked Example 1: Python3 1== # R program to check if # object is a character # Creating a vector x1 <- 4 x2 <- c("a 1 min read 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 Like