tableone icon indicating copy to clipboard operation
tableone copied to clipboard

contDigits =0

Open wstonemd opened this issue 2 years ago • 2 comments

Hi Kaz,

Giving contDigits = 0 to the print.TableOne function to render a continuous variable as an integer appears to error out.

> print(tableOne,contDigits = 1)
                      Stratified by trt
                       1               2               p      test
  n                       158             154                     
  time (mean (SD))     2015.6 (1094.1) 1996.9 (1155.9)  0.883     
  ...
               
> print(tableOne,contDigits = 0)
Error in prettyNum(.Internal(format(x, trim, digits, nsmall, width, 3L,  : 
  invalid value 0 for 'digits' argument

wstonemd avatar May 09 '22 10:05 wstonemd

The same issue and error message is also present for "catDigits = 0". This only seems to be a problem in version 0.12.0 or higher (there's no issue in version 0.11.2)

kpuka avatar Jul 14 '22 16:07 kpuka

Would love to hear if there has been any progress on this issue.

vkerchberger avatar Apr 10 '23 13:04 vkerchberger