MWE: This simple example fails because Species is a factor variable:
library(tinyplot)
with(iris, plt(Sepal.Length, Petal.Length, type = type_text(labels = Species)))
#> Error: `labels` must be character.
Created on 2025-03-09 with reprex v2.1.1
Cause: The assert_character() line here is too strong.
|
assert_character(labels, name = "labels") |
Do we need an assertion here at all? What's wrong with passing numeric to labels, for example?
MWE: This simple example fails because
Speciesis a factor variable:Created on 2025-03-09 with reprex v2.1.1
Cause: The
assert_character()line here is too strong.tinyplot/R/type_text.R
Line 31 in c31c26b
Do we need an assertion here at all? What's wrong with passing numeric to labels, for example?