jsonlite
jsonlite copied to clipboard
Issue with class scalar and vctrs
I stumbled into this issue with vctrs package
> list(
+ tibble(a = "chr", b = 2, d = jsonlite:::as.scalar(22)),
+ tibble(b = 3, c = TRUE)
+ ) %>%
+ bind_rows()
Error: Can't combine `..1` <scalar> and `..2` <vctrs:::common_class_fallback>.
Run `rlang::last_error()` to see where the error occurred.
The issues is mentioned here.
Then, I also found this one, and I am posting it here due to the error message in vcrs
> list(
+ tibble(a = "chr", b = 2, d = jsonlite:::as.scalar(NA)),
+ tibble(b = 3, c = TRUE, d = jsonlite:::as.scalar("myCharacter"))
+ ) %>%
+ bind_rows()
Error: Can't combine `..1$d` <scalar> and `..2$d` <scalar>.
x Some attributes are incompatible.
ℹ The author of the class should implement vctrs methods.
ℹ See <https://vctrs.r-lib.org/reference/faq-error-incompatible-attributes.html>.
Run `rlang::last_error()` to see where the error occurred.
This seems an error in vctrs/tibble? I don't know what I could do about this in jsonlite.