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

keep.trailing.zeros not working correctly #259

Closed
perlmonger opened this issue Apr 26, 2016 · 2 comments
Closed

keep.trailing.zeros not working correctly #259

perlmonger opened this issue Apr 26, 2016 · 2 comments
Assignees
Labels

Comments

@perlmonger
Copy link

There is an example of how keep.trailing.zeros is supposed to preform here:
https://github.com/Rapporter/pander/issues/27

The first part of the example stays the same:

> panderOptions('keep.trailing.zeros', F)
>  p(a)
[1] "_7_, _7.1_ and _7.233_"
> panderOptions('keep.trailing.zeros', T)
>  p(a)
[1] "_7.000_, _7.100_ and _7.233_"
> 

But, this example :

> a<-c(7, 7.1, 7.233)
> panderOptions('keep.trailing.zeros', T)
> pandoc.table(a)

does not return the value shown on the page linked above. Instead I get:

- --- -----
7 7.1 7.233
- --- -----

I am also getting a different result for the mtcars example given on the linked page.

> panderOptions('keep.trailing.zeros', T)
> pander(mtcars[1:3, 1:5])

--------------------------------------------------
      &nbsp;         mpg   cyl   disp   hp   drat 
------------------- ----- ----- ------ ---- ------
   **Mazda RX4**     21     6    160   110   3.9  

 **Mazda RX4 Wag**   21     6    160   110   3.9  

  **Datsun 710**    22.8    4    108    93   3.85 
--------------------------------------------------

I am on Windows and see this behavior for both R x64 3.2.4 Revised and R x64 3.2.5

Thanks!

@daroczig daroczig self-assigned this May 15, 2016
@daroczig daroczig added the bug label May 15, 2016
@mjsteinbaugh
Copy link

I think I'm seeing this bug as well with pander 0.6.0, R. 3.3.1.

@daroczig
Copy link
Member

daroczig commented Sep 5, 2016

I think this was introduced by 9f01b90#diff-06d98d59ee432a4a652caa361f1bfda5L915 (pls check @RomanTsegelskyi if you have some time), and should be fixed with the above commit. Pls let me know if this works or you see any side-effects.

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

No branches or pull requests

3 participants