Skip to content

column name leak/conflict? #715

@espinielli

Description

@espinielli

cols_label fails when you have a column named d.
Without a call to cols_label it works.
Using another column name it works too.

library(tibble)
library(gt)

# this WORKS
# tribble(
#   ~a , ~e ,
#   1, 4,
#   5, 8
# ) %>% 
#   gt() %>% 
#   cols_label(
#     a = "label a",
#     e = "label e"
#   )

tribble(
  ~a , ~d ,
  1, 4,
  5, 8
) %>% 
  gt() %>% 
  cols_label(
    a = "label a",
    d = "label d"
  )
#> Error: The object to `data` is not a `gt_tbl` object.

Created on 2021-02-17 by the reprex package (v1.0.0)

Metadata

Metadata

Assignees

Type

No type

Projects

No projects

Milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions