You can assign datatypes for the field using converting functions or while importing the data into a R variable.
I have used global superstore dataset to show the data format as shown as above.
Lets convert data type of Ship date to Date and Row.Id to number datatype.
> d$Ship.Date = as.Date.character(d$Ship.Date,"%d-%m-%Y")
> d$Row.ID = as.numeric(d$Row.ID)
Another way is to provide a vector of variable locations to assign with a vector of datatypes.
> class(d$Row.ID) = "Numeric"
But this methos does not support date conversion, it would return NA values.