Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

formatOptions=list(big.mark=",") not working for printing absolute frequencies of categorical variables with commas as thousands separators #99

Open
R-Joe opened this issue Sep 16, 2022 · 0 comments

Comments

@R-Joe
Copy link

R-Joe commented Sep 16, 2022

The argument formatOptions = list(big.mark = ",") is not working for printing absolute frequencies of categorical variables with commas as thousands separators.
Consider the minimal example:

library(tableone)
library(survival)
tab <- CreateTableOne(vars= c("edrel","stage"), 
                      factorVars = "stage",
                      data = nwtco)
print(tab, formatOptions = list(big.mark = ","))

Which gives:

                    Overall            
  n                    4,028           
  edrel (mean (SD)) 2,276.68 (1,640.18)
  stage (%)                            
     1                  1572 (39.0)    
     2                  1052 (26.1)    
     3                   944 (23.4)    
     4                   460 (11.4) 

Any advice or suggestions would be greatly appreciated.

@R-Joe R-Joe changed the title formatOptions=list(big.mark = ",") not working for printing absolute frequencies of categorical variables with commas as thousands separators formatOptions=list(big.mark=",") not working for printing absolute frequencies of categorical variables with commas as thousands separators Sep 16, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant