insightsengineering / rlistings

Value formatting and ASCII rendering infrastructure for tables and listings.
https://insightsengineering.github.io/rlistings/
25 stars 5 forks source link

Support additional data type #215

Closed BFalquet closed 1 week ago

BFalquet commented 5 months ago

Using a column of class difftime as key or disp column in a listing is apparently not supported during export as txt and result in:

number of columns of matrices must match (see arg 2)

Could we consider less cryptic error message in formatters::export_as_txt, a warning in as_listing or just supporting this class ? Several users have come with the same issue.

Cheers

gmbecker commented 5 months ago

The issue is likely that the matrix_form method for listings doesn't understand how to format a difftime column, which begs the question, if they were going to support this, what is the desired behavior and how does it interact with the concept of formats in formatter

BFalquet commented 5 months ago

@gmbecker that is actually a good question, I am not sure what the users actually want. Maybe just a clearer error message would be enough.

Melkiades commented 5 months ago

Using a column of class difftime as key or disp column in a listing is apparently not supported during export as txt and result in:

number of columns of matrices must match (see arg 2)

Could we consider less cryptic error message in formatters::export_as_txt, a warning in as_listing or just supporting this class ? Several users have come with the same issue.

Cheers

We never supported that object in input. I think it was always transformed to character