I'd suggest using quote=FALSE in the print
function if working with characters that you do not want enclosed. Since print
also accepts a digits argument you can go either way:
> print(as.character(x), quote=FALSE)
[1] 1426643216897
> print(x, digits=20)
[1] 1426643216897
Versus:
> print(as.character(x) )
[1] "1426643216897"
There is no R long-integer mode. You should understand that numbers with more than 9 base-10 digits are being "stored as decimals", i.e. stored with abscissa+mantissa, but the apparent increase of integer length is accomplished through printing of the exact conversion of the abscissa of the "double" to base-10 representation without the decimal point. Notice what happens if you explicitly attempt to "store as integer":
> x <- 1426643216897L
Warning message:
non-integer value 1426643216897L qualified with L; using numeric value
If you needed to store a number with greater length than the 53 binary digits could handle, you would need to go with character storage, and then use the quote=FALSE option or use cat
for output:
> cat("test")
test
与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…