n_vector = c(23,45,34,67)
class(n_vector)
typeof(n_vector)

c_vector = c(1,2,3,"4")
class(c_vector)
typeof(c_vector)

as.numeric(c_vector)+3


# you can use "is" and that will return a boolean value if data type is TRUE or FALSE
is.character(n_vector)
is.numeric(n_vector)
is.double(n_vector)
Is.logical(c_vector)

Embed on website

To embed this project on your website, copy the following code and paste it into your website's HTML: