Skip to content

type_text(labels = <lab>) should work without characters #334

@grantmcdermott

Description

@grantmcdermott

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?

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions