convert character to integer in r code example Example: character to integer in r x = "1.3" x = as.Integer(x) # x = 1 is.Integer(x) # TRUE