gt icon indicating copy to clipboard operation
gt copied to clipboard

Adds `.col_names` param to `cols_label()`

Open jmbarbone opened this issue 3 years ago • 1 comments

Resolves #830

A few checks are completed:

  • .col_names defaults to NULL
  • If not NULL, ... and .list should not have length()
  • .col_names must be the same length as the colnames from the original data
  • .col_names should not have names -- gives a warning as the names would be overwritten and vector is expected to be in order

Local tests didn't show any conflicts with this

jmbarbone avatar Nov 06 '21 19:11 jmbarbone

CLA assistant check
All committers have signed the CLA.

CLAassistant avatar Nov 06 '21 19:11 CLAassistant

Thanks for the PR, but after a pretty long think about this one, I decided that this might be potentially difficult for the user during iteration; columns could be moved around (by gt or through the API), and columns could get used for the stub or as groups. At that point, it's hard to keep track of the original column order for renaming. But the next best thing to this is probably the .list argument.

rich-iannone avatar May 18 '24 19:05 rich-iannone