| zuyaml_bigint | R Documentation |
A character vector holding the decimal representation of integers that R cannot store exactly: beyond 2^53 a double silently loses precision, and R has no native 64-bit integer scalar.
zuyaml_bigint(x)
x |
A character vector of decimal integers, or an object to coerce. |
yaml_parse() returns one of these when it meets such a value and
big_integers = "bigint" (the default). It carries the decimal
normalisation of the value, not the source text, so 0x1FFFFFFFFFFFFFFF
and its decimal spelling compare equal.
This is a marker for values whose precision must be preserved, not a
big-integer arithmetic type: there is no arithmetic. Use
as.numeric() to accept the precision loss deliberately, or a package such
as bit64 for real 64-bit arithmetic.
zuyaml_bigint() returns a character vector of class
"zuyaml_bigint".
yaml_parse("9223372036854775807")
as.numeric(yaml_parse("9223372036854775807")) # lossy, on purpose
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.