-
Notifications
You must be signed in to change notification settings - Fork 66
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
pander: pander.tabular #157
Conversation
Thank you! To make this pull request more complete, can you please also add a few test cases, so that coveralls would not deny it? It would be also very useful to present the added value of this application. |
The patch implements a method for table::tabular as pander.tabular which can work with any number of variables with even complex table layouts.[1] You can run the test by: > library(tables) > library(pander) > x <- tabular(as.factor(am) ~ (mpg+hp+qsec) * (mean+median), data = mtcars) > pander(x, digits=2, emphasize.rownames=FALSE) [1] https://github.com/rstats-gsoc/gsoc2015/wiki/pander Signed-off-by: Dongcan Jiang <dongcan.jiang@gmail.com>
In this case, a tabular object is created by tables::as.tabular instead of tabular, so that the test file has no need to load the whole 'tables' library, which I think would be better. The document of pander.tabular is added by roxygen2 (4.1.0) referring to Alexis L.[1] [1] https://github.com/YoruNoHikage/pander/blob/master/man/pander.tabular.Rd Helped-by: Gergely Darócz <daroczig@rapporter.net> Signed-off-by: Dongcan Jiang <dongcan.jiang@gmail.com>
@daroczig Thanks for your comments. I've added the test and document then repushed it. But the Travis CI failed. I am very confused about the reason in log "The command "sudo apt-get install r-base-dev pandoc qpdf texinfo texlive-latex-extra texlive-fonts-recommended texlive-fonts-extra libxml2-dev" failed and exited with 100 during ." Could you give me some suggestions? Thanks. |
Sometimes |
Thank you, guys -- I've restarted the Travis job. And yeah, this happens sometimes. Will update Travis to use Rocker instead of the apt-get heavy commands, which should be a lot faster. |
Helped-by: Roman Tsegelskyi <roman.tsegelskyi@gmail.com> Helped-by: Gergely Darócz <daroczig@rapporter.net> Signed-off-by: Dongcan Jiang <dongcan.jiang@gmail.com>
@daroczig @RomanTsegelskyi Thank you. I've added the test and passed the coveralls. |
Thank you very much, this is a very valuable pull request. Please do not forget to register later on Google Melange as part of the official GSoC application with a complete program. Also, if you end up with any further improvements to this PR, please push those as well later. I think @RomanTsegelskyi's version is more mature ATM. |
Thank you very much for this submission, but #161 was accepted for GSoC 2015 after all. |
The patch implements a method for table::tabular as pander.tabular which
can work with any number of variables with even complex table layouts.[1]
One test case is added to test-S3.R. In this case, a tabular object is created
by tables::as.tabular instead of tabular, so that the test file has no need to
load the whole 'tables' library, which I think would be better.
The document of pander.tabular is added by roxygen2 (4.1.0) referring to
Alexis L.[2]
You can run the test by:
[1] https://github.com/rstats-gsoc/gsoc2015/wiki/pander
[2] https://github.com/YoruNoHikage/pander/blob/master/man/pander.tabular.Rd
Helped-by: Gergely Darócz daroczig@rapporter.net
Signed-off-by: Dongcan Jiang dongcan.jiang@gmail.com