is.factor(X)
This function takes a single parameter value, X
, which represents any R object.
This function returns a TRUE
or FALSE
value.
# creating different R objectsHeight <- factor(c("Tall", "Average", "Short"))my_function <- function() {print("Hello World!")}# checking if they are factors or notis.factor(Height)is.factor(my_function)
factor()
function to create an R object, Height
.function()
function to create another R object, myfunction
.is.factor()
function to check if the object Height
is a factor or not.is.factor()
function to check if the object myfunction
is a factor or not.