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