pander
pander copied to clipboard
pander.describe not working
I cannot get the pander function to work for the describe object class. I have tried both the pander package install from CRAN as well as from GitHub using devtools. Both give me the same empty output. My example follows below. I'm running Windows 10, R v3.2.5 (complete SessionInfo below). Any guidance or suggestions are much appreciated. Thank you.
For the following code:
m <- mtcars
describe(m$gear)
pander(describe(m$gear))
The describe() function provides this output
m$gear
n missing unique Info Mean
32 0 3 0.84 3.688
3 (15, 47%), 4 (12, 38%), 5 (5, 16%)
but the pander(describe(m$gear)) is basically blank
-------------- ----------- ------------ ------------ ------------
**descript** **units** **format** **counts** **values**
-------------- ----------- ------------ ------------ ------------
Here is my sessionInfo()
> sessionInfo()
R version 3.2.5 (2016-04-14)
Platform: x86_64-w64-mingw32/x64 (64-bit)
Running under: Windows >= 8 x64 (build 9200)
locale:
[1] LC_COLLATE=English_United States.1252
[2] LC_CTYPE=English_United States.1252
[3] LC_MONETARY=English_United States.1252
[4] LC_NUMERIC=C
[5] LC_TIME=English_United States.1252
attached base packages:
[1] stats graphics grDevices utils datasets methods
[7] base
other attached packages:
[1] pander_0.6.0 devtools_1.10.0 Hmisc_3.17-2 ggplot2_2.1.0
[5] Formula_1.2-1 survival_2.38-3 lattice_0.20-33 reshape2_1.4.1
[9] descr_1.1.3 knitr_1.13
loaded via a namespace (and not attached):
[1] Rcpp_0.12.5 formatR_1.4 RColorBrewer_1.1-2
[4] git2r_0.13.1 plyr_1.8.3 highr_0.6
[7] tools_3.2.5 rpart_4.1-10 digest_0.6.9
[10] evaluate_0.9 memoise_1.0.0 gtable_0.2.0
[13] curl_0.9.5 yaml_2.1.13 gridExtra_2.2.1
[16] withr_1.0.1 stringr_1.0.0 httr_1.1.0
[19] cluster_2.0.3 grid_3.2.5 nnet_7.3-12
[22] R6_2.1.2 foreign_0.8-66 rmarkdown_0.9.6
[25] latticeExtra_0.6-28 magrittr_1.5 scales_0.4.0
[28] htmltools_0.3.5 splines_3.2.5 rsconnect_0.4.2.2
[31] xtable_1.8-2 colorspace_1.2-6 stringi_1.1.1
[34] acepack_1.3-3.3 munsell_0.4.3
>
It seems that the structure of the describe object changed in Hmisc, see pander:::pander.describe. We had similar issue with other objects in the past, I'm thinking about either
- trying to move these functions to Hmisc if the author is willing to maintain the code there (who knows a lot better if internal object structure changes)
- drop support for these objects