2018-05-14
You can install R package “ztable” from CRAN. Current version is 0.1.8.
install.packages("ztable")
You can install the developmental version of ztable from github. Current github version is 0.1.9.
if(!require(devtools)) install.packages("devtools")
::install_github("cardiomoon/ztable") devtools
Package “ztable” make everything possible about table. Basically, An object of “ztable” made from a data.frame. The default output format of ztable is RStudio::viewer or web-browser format(type=“viewer”). So if you want to use ztable in a “html” format, you should change the parameter ztable.type to “html”. If you want to use ztable in latex format, you should change the parameter ztable.type to “latex”.
library(ztable)
library(magrittr)
options(ztable.type="html")
=ztable(head(iris),caption="Table 1. Basic Table")
z z
Sepal.Length | Sepal.Width | Petal.Length | Petal.Width | Species | |
---|---|---|---|---|---|
1 | 5.10 | 3.50 | 1.40 | 0.20 | setosa |
You can see the full vignette here:
ztable vignette: https://cran.r-project.org/web/packages/ztable/vignettes/ztable.html
ztable update: http://rpubs.com/cardiomoon/388645