Learn R Programming


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.3

License

GPL-2

Issues

Pull Requests

Stars

Forks

Maintainer

KeonWoong Moon

Last Published

September 28th, 2021

Functions in ztable (0.2.3)

addColColor

Add column colors of an object of ztable
cGroupSpan

Count the colspan of each colgroup
isspanCol

Identify the spanCol status of a cell
make.cell.color

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

Identify the spanRow status of a cell
alignCount

Count the number of align
isGroupCol

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

Find rgb value from color name
data2table

Convert data to formatted data for table
define_colors

Define colors
colGroupCount

Count the colgroup of an object of ztable
normalize2

Convert numeric vector min to 0, max to maxvalue
getspanRowLength

Gets spanRow length
cgroup2df

Convert cgroup of ztable into data.frame
caption2minipage

Convert long caption to minipage
getspanRowData

Gets the spanRow start column
print_ztable

Print an object of class "ztable"
repColor

Make vector x from vector color
getNewSpanRow

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

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

Make align for an object of class ztable.mytable
myhtmlStyle

print html style
ztable.mytable

Make ztable from object mytable
ztable2viewer

Print an object of ztable via rstudioapi::viewer
ztable2flextable

Convert an object of ztable into an object of flextable
totalLeft

Arrange total column to the left
tr

Subfunction used in ztable2latex
ztable_sub

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

Add or delete vertical lines in a ztable
zcolors

Definition of Latex Color
validColor

Find valid color name
printRowGroup

Print Row Groups in a latex table
printLatexHead

Print the head of latex table if the object of ztable has a colgroup
ztable2html

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

Update ztable before print
gradientColor

Make Sequential colour gradient palette
color2hex

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

Add or delete horizontal lines in a ztable
ztable2latex

Print an object of class "ztable" to Latex table
parallelTablesHTML

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

Delete first components of align
.onAttach

Hooks for Namespace Events
alignCheck

Check the validity of align
getNewAlign

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

Place two or more ztables or figures side by side in Latex or HTML format
print.ztable

Print an object of class "ztable"
printHTMLHead

Print HTML head if ztable object a has a colgroup
spanRow

Merging data cells of ztable object in rows
spanColWidth

Calculate the spanColWidth when spanCol start
palette2colors

Extract hexadecimal colors from a color palette
make.frontcolor

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

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

Find valid color name
vline2align

Make a latex "align" from a string and vertical line specifier
trim.ztable

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

Subfunction used in ztable2html
ztable.cbind.mytable

Make ztable from object cbind.mytable
makeHeatmap

Add gradient background color to ztable
spanCol

Merging data cells of ztable object in columns
totalCol

Calculating total columns of ztable
roundDf

Round the numbers of a data.frame
tableLength

Convert data to formatted data for table
ztable.table

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

Add column colors of an object of ztable
addSubColNames

Add a adjunctive name below column name in a ztable
addRowColor

Add row colors of an object of ztable
addSigColor

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

Add column colors of an object of ztable
align2html

Convert the align in Latex format to html format
addrgroup

Add row groups of an object of ztable
addcgroup

Add column groups of an object of ztable
align2lines

count the vertical column lines from align of Latex format