md_new: Create Markdown table skeleton

Description Usage Arguments Details Value See Also Examples

Description

Creates a bare bone for generating a markdown table. Alignments and size of the table can be input by users.

Usage

1
md_new(nrow = 2, ncol = 2, align = NULL, header = NA)

Arguments

nrow, ncol

number of columns and rows for the table

align

Column alignment: a single character of 'l' (left), 'c' (center) and/or 'r' (right). If align = 'l', all columns are left aligned. e.t.c.

header

A character vector of length = ncol to be used for the header of the table. Default NA.

Details

The output markdown source code is stored as character vector in R. It can be further copied and pasted for other usage.

Value

A character vector of the table source code.

See Also

Other R packages such as 'kableExtra', and 'tables' for HTML and LaTeX tables, and ascii and pander for different flavors of markdown output and some advanced features and table styles.

Examples

1
2
md_new(2,3, align = "c")
md_new(2,3, header = c("a", "b", "c"))

UBC-MDS/tidyplusR documentation built on May 25, 2019, 1:36 p.m.