insightsengineering / formatters

A framework for creating listings of raw data that include specialized formatting, headers, footers, referential footnotes, and pagination.
https://insightsengineering.github.io/formatters/
Other
15 stars 6 forks source link

Uniform documentation and behavior for `na_str` - Can I add a vector? #251

Open Melkiades opened 9 months ago

Melkiades commented 9 months ago

@Melkiades on second thought, I think we should make a separate PR to tackle this issue - we have to also consider the fact that users can supply multiple na_str values for multi-value formats (e.g. na_str = c("lo", "hi") for "xx.xx - xx.xx"), which would complicate enabling vector input.

I see! Have you made it already? I think we need to understand how it is exactly applied and uniform that. In other words, we have to see exactly what providing a vector entails. From a user perspective, you would do 3 things: (1) one for all na_str (current default). (2) 2+ for specific formats (how do we select them externally? I do not remember, is na_str working as formats, that you can specify different values with named vectors?) (3) assign them all in order (if less, cycle)

_Originally posted by @edelarua @Melkiades in https://github.com/insightsengineering/formatters/pull/250#discussion_r1463038438_