Since R 4.2.0, digits arguments of format() is constrained to be higher or equal to 1.
nsmallset to zero should be enough to get the requested "integer" format.
This PR, ensures digits is at least 1 in print_ctable().
fixes #163
master branch (current behaviour)
data("tobacco")
ctable(tobacco$gender, tobacco$smoker, round.digits = 0)
#> Error in prettyNum(.Internal(format(x, trim, digits, nsmall, width, 3L, :
#> invalid value 0 for 'digits' argument
Since R 4.2.0,
digits
arguments offormat()
is constrained to be higher or equal to 1.nsmall
set to zero should be enough to get the requested "integer" format.This PR, ensures digits is at least
1
inprint_ctable()
.fixes #163
master
branch (current behaviour)PR