Hi Anand,
Try as below -
class(dataset/dataframe$col_name) <- "data type"
For Ex: Below code would change the datatype of Sepal. Length to an integer.
data = datasets::iris
class(data$Sepal.Length) <- "integer"
Here new data type should be given that can take the domain of already existing elements in the column.
Such as Numeric -> integer/character but the reverse is not always possible.
Check the validity of the datatype and accordingly change the datatype.