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 creates error in pander.table #371

Open
couthcommander opened this issue Jun 10, 2024 · 0 comments
Open

keep.trailing.zeros creates error in pander.table #371

couthcommander opened this issue Jun 10, 2024 · 0 comments

Comments

@couthcommander
Copy link

I have a three-dimensional table. When passed to pander with "keep.trailing.zeros" set to TRUE, pandoc.table.return fails because "justify" and "t.width" are not the same. (sorry my simple example uses integers - I can change to floats and same error results)

> x=structure(c(70L, 52L, 70L, 28L, 303L, 205L, 477L, 82L, 96L, 26L, 
    172L, 16L), dim = c(2L, 2L, 3L), dimnames = list(female = c("Male", 
    "Female"), full = c("Assist/Assoc", "Full"), field = c("Arts", 
    "Other", "Prof")), class = c("xtabs", "table"))
> x
, , field = Arts

        full
female   Assist/Assoc Full
  Male             70   70
  Female           52   28

, , field = Other

        full
female   Assist/Assoc Full
  Male            303  477
  Female          205   82

, , field = Prof

        full
female   Assist/Assoc Full
  Male             96  172
  Female           26   16

> pander(x)

-------- -------------- ------- ------ ------- ------
                         field   Arts   Other   Prof 

 female       full                                   

  Male    Assist/Assoc            70     303     96  

              Full                70     477    172  

 Female   Assist/Assoc            52     205     26  

              Full                28     82      16  
-------- -------------- ------- ------ ------- ------

> pander(x, keep.trailing.zeros = TRUE)
Error in pandoc.table.return(...) : 
  Wrong number of parameters (6 instead of *3*) passed: justify
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