htable: Create a new HTable object

Description Usage Arguments Value

View source: R/htable.R

Description

Creates a new HTable reference class object from the given data frame.

Usage

1
2
3
4
5
htable(x, handle_rownames = c("drop", "add_first", "add_last"),
  rownames_col_name = "RowNames", table_style = "", thead_style = "",
  tbody_style = "", tr_styles = rep("", nrow(x) + 1), in_div = FALSE,
  div_style = "", table_id = "", table_class = "", div_id = "",
  div_class = "")

Arguments

x

Data frame.

handle_rownames

How to handle rownames. Either drop them, add them as the first column, or add them as the last column.

rownames_col_name

Column name to use for the rownames if adding them to x.

table_style

Character vector (of length 1). This is the CSS style applied to the overall <table> tag.

thead_style

Character vector (of length 1). This is the CSS style applied to the <thead> tag.

tbody_style

Character vector (of length 1). This is the CSS style applied to the <tbody> tag.

tr_styles

Character vector (of length nrow(x) + 1). These styles are applied to each <tr> tag in the table.

in_div

A boolean indicator if the HTable should be wrapped in a <div> container.

div_style

A character vector (length 1) that is used to style the <div> container if in_div = TRUE.

id

A character vector (length 1) that is used as the id attribute for either the overall <table> tag (if in_div = FALSE) or the overall <div> tag (if in_div = TRUE).

class

A character vector (length 1) that is used as the class attribute for either the overall <table> tag (if in_div = FALSE) or the overall <div> tag (if in_div = TRUE).

Value

Reference class object of class HTable.


fazetu/htable documentation built on Feb. 12, 2020, 10:13 a.m.