generateTable: Generate Table

Description Usage Arguments Value Classification Author(s) References Examples

View source: R/generateTable.R

Description

Generate table format in R documentation

Usage

1
generateTable(content_dt, alignement_s_1 = NA_character_, numberRows_b_1 = FALSE)

Arguments

content_dt

A data.table to be use a source data

alignement_s_1

A single string value, expressing the column alignment directive

numberRows_b_1

A single boolean value. Set it when you want data rows to be automatically numbered.

Value

a single string, containing potentially many embedded formatting strings.

Classification

STRATUM ▶ LAYER_1

PHASING ▶ BUILD

INTENT ▶ PARTS_BUILDING

Author(s)

Fabien Gelineau <neonira@gmail.com>

Maintainer: Fabien Gelineau <neonira@gmail.com>

References

Refer to Writing R extensions section Lists and Tables .

Examples

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
library(data.table)
dt <- data.table::data.table(x = runif(3), y = letters[1:3])

generateTable(dt)
# "\tabular{ll}{\n0.975343016441911 \tab a \cr\n
#  0.647014946676791 \tab b \cr\n0.576294980244711 \tab c \cr\n}"

generateTable(dt, numberRows_b_1 = TRUE)
# "\tabular{rll}{\n1 \tab 0.11690619844012 \tab a \cr\n
#  2 \tab 0.467709563905373 \tab b \cr\n3 \tab 0.957075224025175 \tab c \cr\n}"

neonira/wyz.code.rdoc documentation built on Feb. 19, 2020, 12:47 p.m.