R: How to convert long number to string to save precision
问题 I have a problem to convert a long number to a string in R. How to easily convert a number to string to preserve precision? A have a simple example below. a = -8664354335142704128 toString(a) [1] "-8664354335142704128" b = -8664354335142703762 toString(b) [1] "-8664354335142704128" a == b [1] TRUE I expected toString(a) == toString(b) , but I got different values. I suppose toString() converts the number to float or something like that before converting to string. Thank you for your help.