Learn R Programming

⚠️There's a newer version (0.2.3) of this package.Take me there.

title: "ztable Update" author: "Keon-Woong Moon" date: "2018-05-14" output: rmarkdown::html_vignette vignette: > %\VignetteIndexEntry{ztable_update} %\VignetteEngine{knitr::rmarkdown} %\VignetteEncoding{UTF-8}

Installation

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")
devtools::install_github("cardiomoon/ztable")

Make table from a data.frame

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")
z=ztable(head(iris),caption="Table 1. Basic Table")
z

You can see the full vignette here:

  1. ztable vignette: https://cran.r-project.org/web/packages/ztable/vignettes/ztable.html

  2. ztable update: http://rpubs.com/cardiomoon/388645

Copy Link

Version

Install

install.packages('ztable')

Monthly Downloads

2,017

Version

0.2.2

License

GPL-2

Issues

Pull Requests

Stars

Forks

Maintainer

KeonWoong Moon

Last Published

October 8th, 2020

Functions in ztable (0.2.2)

addcgroup

Add column groups of an object of ztable
colGroupCount

Count the colgroup of an object of ztable
addFrontColor

Add column colors of an object of ztable
align2html

Convert the align in Latex format to html format
align2lines

count the vertical column lines from align of Latex format
color2hex

Convert a named color into a hexadecimal color with rgb value
data2table

Convert data to formatted data for table
.onAttach

Hooks for Namespace Events
addRowColor

Add row colors of an object of ztable
getNewAlign

Make a character string indicating the alignment of components of table.
align2nd

Delete first components of align
alignCheck

Check the validity of align
alignCount

Count the number of align
getNewSpanCol

Calculating new spanCol with spanCol plus space made by column group
addColColor

Add column colors of an object of ztable
gradientColor

Make Sequential colour gradient palette
isspanRow

Identify the spanRow status of a cell
addSigColor

Add row color or cellcolor for rows or cells of p-value less than sigp in a ztable
make.cell.color

Make a data.frame named "cellcolor" from ztable call
makeHeatmap

Add gradient background color to ztable
getspanRowLength

Gets spanRow length
printLatexHead

Print the head of latex table if the object of ztable has a colgroup
make.frontcolor

Make a data.frame named "cellcolor" from ztable call
getspanRowData

Gets the spanRow start column
define_colors

Define colors
printRowGroup

Print Row Groups in a latex table
validColor

Find valid color name
update_ztable

Update ztable before print
make_align

Make align for an object of class ztable.mytable
addSubColNames

Add a adjunctive name below column name in a ztable
name2rgb

Find rgb value from color name
normalize2

Convert numeric vector min to 0, max to maxvalue
parallelTablesLatex

Place two or more ztables or figures side by side in Latex format
tr

Subfunction used in ztable2latex
getNewSpanRow

Calculating new spanRow with spanRow plus space made by row group
parallelTablesHTML

Place two or more ztables or figures side by side in HTML format
vlines

Add or delete vertical lines in a ztable
totalLeft

Arrange total column to the left
hlines

Add or delete horizontal lines in a ztable
ztable.mytable

Make ztable from object mytable
myhtmlStyle

print html style
zcolors

Definition of Latex Color
ztable2flextable

Convert an object of ztable into an object of flextable
print.ztable

Print an object of class "ztable"
print_ztable

Print an object of class "ztable"
repColor

Make vector x from vector color
printHTMLHead

Print HTML head if ztable object a has a colgroup
spanColWidth

Calculate the spanColWidth when spanCol start
tableLength

Convert data to formatted data for table
palette2colors

Extract hexadecimal colors from a color palette
validColor2

Find valid color name
vline2align

Make a latex "align" from a string and vertical line specifier
spanRow

Merging data cells of ztable object in rows
parallelTables

Place two or more ztables or figures side by side in Latex or HTML format
ztable2viewer

Print an object of ztable via rstudioapi::viewer
totalCol

Calculating total columns of ztable
caption2minipage

Convert long caption to minipage
cgroup2df

Convert cgroup of ztable into data.frame
isGroupCol

Returns whether or not column with position start plus length is group column
ztable_sub

Exporting "data.frame" to an object of class "ztable"
roundDf

Round the numbers of a data.frame
spanCol

Merging data cells of ztable object in columns
ztable.table

Exporting a R object to an object of class "ztable"
tr2

Subfunction used in ztable2html
isspanCol

Identify the spanCol status of a cell
ztable2html

Print an object of class "ztable" to html table
ztable2latex

Print an object of class "ztable" to Latex table
trim.ztable

Make align and edit p value column for an object of class ztable.mytable
ztable.cbind.mytable

Make ztable from object cbind.mytable
addrgroup

Add row groups of an object of ztable
addCellColor

Add column colors of an object of ztable
cGroupSpan

Count the colspan of each colgroup