OHDSI / CohortDiagnostics

An R package for performing various cohort diagnostics.
https://ohdsi.github.io/CohortDiagnostics
40 stars 45 forks source link

Add percent with decimal formatting to characterization output #1013

Closed gowthamrao closed 3 weeks ago

gowthamrao commented 1 year ago

Characterization output does not have formatting

image

here the 0.0 implies the value is some where > 0.00 but less than 0.05 i.e. between 0 to 5% a value of 0.1 implies the value is some where > 0.05 but < 0.15

We need more precision in this table. A true value of 0.0412 should be shown 4.1%, value of 0.0643 A 6.4%, a value of 0.834 as 83.4%

azimov commented 1 year ago

Data now displays as a percentage when only proportional data is displayed. This table function is too complex to modify as is in a reasonable time to support both continuous and percentage variables in the way it is constructed. This change would be significant and will have to wait for a future version.

pbr6cornell commented 1 year ago

Jamie, could we at least start by just changing the precision on all numbers to 2 digits instead of only 1? That way we could at least see what % in whole number. In present form, 1 digit means the vast majority of numbers dont give us sufficient context to use to even sort the values properly.

pbr6cornell commented 1 year ago

Ah, perhaps i misunderstood, are you saying that restricitng to only proportions as an input will format values correctly? % with a decimal point? So the issue here was just not limiting the selction correctly? If so, then that could work, but maybe 2 decimal would be a reasonable compromise in this mixed mode version