Open mgirlich opened 2 years ago
Maybe just add as an example in the vignette:
tib_bigint <- function(key,
...,
required = TRUE,
fill = NA_character_) {
tib_variant(
key = key,
required = required,
fill = fill,
transform = as.character
)
}
But the formatting doesn't look nice... Add helpers for formatting?
Big ints are often quite painful to work with. If they come from
jsonlite::fromJSON()
one has the issue of mixed types or loss of precision:Created on 2022-07-26 by the reprex package (v2.0.1)
If one uses
bigint_as_char = TRUE
one might get mixed types. To parse them with tibblify requirestib_variant()
and a conversion later on. This feels a bit awkward...Idea: add
tib_bigint(output_form = c("integer64", "character"))
. For"integer64"
: convert integer like character to int64 and integer like doubles to int64"character"
: convert numbers to characterAfter #153 this can be done via a simple wrapper around
tib_variant()
.