-
Notifications
You must be signed in to change notification settings - Fork 78
Open
Description
I would like to offer more options to format numbers in the tibble package. The "formattable" class looks like an excellent start. I have found the following functions, have I missed any?
accounting()comma()currency()digits()percent()prefix()scientific()suffix()
I would add a pillar_shaft() method for the "formattable" class to ensure that the numbers are aligned properly and to add color. (The existing format.formattable() method doesn't seem to add padding spaces like the default method does, is this by design?)
I would change a few things, though:
- Add a common prefix, e.g.
val_ornum_, to all constructors. (Thefmt_prefix would create collisions with gt and huxtable.) - Avoid S3 dispatch in constructors, instead implement
parse_xxx_....()functions for character input - Maybe add a
Mathmethod (is there a reason you went for overloading the individual operators?)
Because formattable brings in a few heavy dependencies, I'd rather create a new package from which formattable could import. What's the best way to move forward?
Metadata
Metadata
Assignees
Labels
No labels