Skip to content

Error using names_inform_repair() interactively #1831

@billdenney

Description

@billdenney

This is the issue underlying tidyverse/tibble#1664

The following works in reprex but does not work interactively. The error is coming from this line when run interactively:

inform(message = message, class = "rlib_message_name_repair")

@krlmlr, I have isolated the issue here.

orig_names <- c("Timepoint \r\n(hr)", "Timepoint (day)", "1501", "1502", "1503", 
                "", "30 mg/kg", "", "", "", "", "", "", "", "", "", "", "Timepoint \r\n(hr)", 
                "Timepoint (day)", "1501", "1502", "1503")
names <- c("Timepoint \r\n(hr)...1", "Timepoint (day)...2", "1501...3", 
           "1502...4", "1503...5", "...6", "30 mg/kg", "...8", "...9", "...10", 
           "...11", "...12", "...13", "...14", "...15", "...16", "...17", 
           "Timepoint \r\n(hr)...18", "Timepoint (day)...19", "1501...20", 
           "1502...21", "1503...22")
rlang::names_inform_repair(old = orig_names, new = names)
#> New names:
#> • `Timepoint (hr)` -> `Timepoint (hr)...1`
#> • `Timepoint (day)` -> `Timepoint (day)...2`
#> • `1501` -> `1501...3`
#> • `1502` -> `1502...4`
#> • `1503` -> `1503...5`
#> • `` -> `...6`
#> • `` -> `...8`
#> • `` -> `...9`
#> • `` -> `...10`
#> • `` -> `...11`
#> • `` -> `...12`
#> • `` -> `...13`
#> • `` -> `...14`
#> • `` -> `...15`
#> • `` -> `...16`
#> • `` -> `...17`
#> • `Timepoint (hr)` -> `Timepoint (hr)...18`
#> • `Timepoint (day)` -> `Timepoint (day)...19`
#> • `1501` -> `1501...20`
#> • `1502` -> `1502...21`
#> • `1503` -> `1503...22`

Created on 2025-09-30 with reprex v2.1.1

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions