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

Add noLeadingZeroes argument to latexTable(), and make it TRUE by default #9

Open
jbullock35 opened this issue Jan 13, 2020 · 2 comments

Comments

@jbullock35
Copy link
Owner

When formatNumbers is TRUE in a call to latexTable(), leading zeroes are eliminated. For example, "0.67" becomes ".67". But some people don't like this behavior. So add a noLeadingZeroes argument to the function. When TRUE, the default, it will function as it does now. When FALSE, leading zeroes won't be touched.

And: if we implement noLeadingZeroes, do we still need the formatNumbers argument at all? Or would the combination of noLeadingZeroes and decimalPlaces cover everything? (formatNumbers may induce some rounding, but that should probably be a default; the user needn't have control over that in latexTable().)

@jbullock35
Copy link
Owner Author

We shouldn't eliminate the formatNumbers argument. See ?latexTable on this argument: formatNumbers rounds numbers, pads out numbers with trailing zeroes, and removes leading zeroes. It's not obvious that the padding function should be covered by a decimalPlaces argument. Better to leave formatNumbers as is.

@jbullock35
Copy link
Owner Author

Add an option for the entire package, and make the function read that option – just as I do with regTable and digits.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

1 participant