Rapporter / pander

An R Pandoc Writer: Convert arbitrary R objects into markdown
http://rapporter.github.io/pander/
Open Software License 3.0
294 stars 66 forks source link

Error when using pander with a `tbl_df` object. #299

Closed lwjohnst86 closed 7 years ago

lwjohnst86 commented 7 years ago

This error occurs when using pander with any tbl_df object. See below

library(tibble)
library(pander)
pander(head(as_data_frame(iris)))
#> Error in dimnames(x) <- dn: length of 'dimnames' [2] not equal to array extent
#> Error in if (tail(stdout, 1) == "") {: argument is of length zero
# This has the same error as: pander(head(dplyr::tbl_df(iris)))
devtools::session_info()
#> Session info -------------------------------------------------------------
#>  setting  value                       
#>  version  R version 3.4.0 (2017-04-21)
#>  system   x86_64, linux-gnu           
#>  ui       X11                         
#>  language en_CA:en                    
#>  collate  en_CA.UTF-8                 
#>  tz       Canada/Eastern              
#>  date     2017-05-26
#> Packages -----------------------------------------------------------------
#>  package   * version date       source         
#>  backports   1.1.0   2017-05-22 cran (@1.1.0)  
#>  base      * 3.4.0   2017-04-21 local          
#>  compiler    3.4.0   2017-04-21 local          
#>  datasets  * 3.4.0   2017-04-21 local          
#>  devtools    1.13.1  2017-05-13 CRAN (R 3.4.0) 
#>  digest      0.6.12  2017-01-27 CRAN (R 3.4.0) 
#>  evaluate    0.10    2016-10-11 CRAN (R 3.4.0) 
#>  formatR     1.5     2017-04-25 CRAN (R 3.4.0) 
#>  graphics  * 3.4.0   2017-04-21 local          
#>  grDevices * 3.4.0   2017-04-21 local          
#>  htmltools   0.3.6   2017-04-28 CRAN (R 3.4.0) 
#>  knitr       1.16    2017-05-18 CRAN (R 3.4.0) 
#>  magrittr    1.5     2014-11-22 CRAN (R 3.4.0) 
#>  memoise     1.1.0   2017-04-21 CRAN (R 3.4.0) 
#>  methods   * 3.4.0   2017-04-21 local          
#>  pander    * 0.6.0   2015-11-23 CRAN (R 3.4.0) 
#>  Rcpp        0.12.11 2017-05-22 cran (@0.12.11)
#>  rlang       0.1.1   2017-05-18 CRAN (R 3.4.0) 
#>  rmarkdown   1.5     2017-04-26 CRAN (R 3.4.0) 
#>  rprojroot   1.2     2017-01-16 CRAN (R 3.4.0) 
#>  stats     * 3.4.0   2017-04-21 local          
#>  stringi     1.1.5   2017-04-07 CRAN (R 3.4.0) 
#>  stringr     1.2.0   2017-02-18 CRAN (R 3.4.0) 
#>  tibble    * 1.3.1   2017-05-17 CRAN (R 3.4.0) 
#>  tools       3.4.0   2017-04-21 local          
#>  utils     * 3.4.0   2017-04-21 local          
#>  withr       1.0.2   2016-06-20 CRAN (R 3.4.0) 
#>  yaml        2.1.14  2016-11-12 CRAN (R 3.4.0)
daroczig commented 7 years ago

Thanks for the report. Can you try the dev version installed from GH? It has been fixed a while ago at #234

lwjohnst86 commented 7 years ago

Yes, the dev version works. Any reason the updated version isn't up on CRAN yet? The dev version and CRAN version are listed as the same version number.

daroczig commented 7 years ago

Did not have much time to spend on pander recently :S Will try to get that to CRAN soon