type.convert() function in R Language is used to compute the data type of a particular data object.
It can convert data object to logical, integer, numeric, or factor.
x: It can be a vector matrix or an array
Example 1: Apply type.convert to vector of numbers
Here in the above code, we can see that before
type.convert() function all the numbers are stored in it, but still its a character vector. And after the function it became “Integer”.
Example 2: Type conversion of a vector with both characters and integers.
 "character"  "factor"
Here, in the above code there were some characters and some integers after using type.convert() function. So, the output comes to be a factor.