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

Scientific notation for p-values still remains after setting 'round' option #45

Closed
kovla opened this issue Jun 1, 2013 · 2 comments
Closed

Comments

@kovla
Copy link

kovla commented Jun 1, 2013

Hi,

I am trying to get a neat output from an lm object. Here goes:

x <- rnorm(100,mean=4)
y <- log(x)
model <- lm(y~x)

panderOptions('round')
[1] Inf

pander(model)

--------------------------------------------------------------
     &nbsp;        Estimate   Std. Error   t value   Pr(>|t|) 
----------------- ---------- ------------ --------- ----------
 **(Intercept)**    0.174      0.03739      4.653   1.025e-05 

      **x**         0.2909     0.008972     32.42   3.452e-54 
--------------------------------------------------------------

Table: Fitting linear model: y ~ x

panderOptions('round',2)
pander(model)

--------------------------------------------------------------
     &nbsp;        Estimate   Std. Error   t value   Pr(>|t|) 
----------------- ---------- ------------ --------- ----------
 **(Intercept)**     0.17        0.04       4.653   1.025e-05 

      **x**          0.29        0.01       32.42   3.452e-54 
--------------------------------------------------------------

Table: Fitting linear model: y ~ x

So, only estimates and standard errors are rounded, and not the t- and p-values. Is this is a bug or am I missing some new option to control this? Thanks!

@daroczig
Copy link
Member

daroczig commented Jun 2, 2013

Thank you very much for finding and filing this bug that I introduced with a recent refactoring. I've just commited a fix, hopefully without causing any new bugs :) Please verify.

@kovla
Copy link
Author

kovla commented Jun 3, 2013

All works fine, neat presentation now with keep.trailing.zeros = TRUE. Thank you.

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

2 participants