-
Notifications
You must be signed in to change notification settings - Fork 42
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
Commas between numbers (df. N) #21
Comments
Agreed. Just two thoughts:
|
Hi I was interested in this request too! Here are my questions/comments:
suppressMessages(library(texreg))
remotes::install_github("MatthieuStigler/matPkg", upgrade = "never")
library(matPkg)
example(texreg, echo=FALSE)
##
out <- texreg(list(model.1, model.2), booktabs = TRUE, dcolumn = TRUE, use.packages = FALSE)
out_noDC <- texreg(list(model.1, model.2), booktabs = TRUE, dcolumn = FALSE, use.packages = FALSE)
out2 <- gsub("108", format(1011288, big.mark = "' "), out)
out3 <- gsub("108", format(1011288, big.mark = ","), out)
out4 <- gsub("108", paste("$", format(1011288, big.mark = "\\\\\\\\\\\\,"), "$", sep=""), out)
out2_noDC <- gsub("108", format(1011288, big.mark = "' "), out_noDC)
out3_noDC <- gsub("108", format(1011288, big.mark = ","), out_noDC)
out4_noDC <- gsub("108", paste("$", format(1011288, big.mark = "\\\\\\\\\\\\,"), "$", sep=""), out_noDC)
## this (custom, internal) funciton will create a pdf in getwd():
mat_table_to_pdf(out2, file = "example_prime.tex")
mat_table_to_pdf(out3, file = "example_period.tex")
mat_table_to_pdf(out4, file = "example_space.tex")
mat_table_to_pdf(out2_noDC, file = "example_noDC_prime.tex")
mat_table_to_pdf(out3_noDC, file = "example_noDC_period.tex")
mat_table_to_pdf(out4_noDC, file = "example_noDC_space.tex") plain, periodplain, primeplain, spacedcolumn, perioddcolumn, primedcolumn, space |
It would be great to have an option (or default) to put commas in between numbers that are integers.
4,234,332
The text was updated successfully, but these errors were encountered: