BLtable: Function to compile BL-table.

Description Usage Arguments Value Examples

View source: R/BLtable.R

Description

Function to compile BL-table.

Usage

1
2
3
4
BLtable(data, info, group.var, sign.digits = 2, sign.digits.prop = 1,
  pvalue.digits = 3, pvalue.cutoff = 0.001, test.input = TRUE,
  factor.level.bullet = "- ", less.than.character = "< ",
  linebreak.tag = "")

Arguments

data

A data frame that contains the baseline (BL) data (one row per participant).

info

A data frame with specifications for the BL-table. (See Examples below.)

group.var

The name of the variable (column) in data that partitions the data set into two groups.

sign.digits

Digits used for mean, standard deviation, etc.

sign.digits.prop

Digits used for proportion of cases for factors.

pvalue.digits

Digits used for p-values.

pvalue.cutoff

Cutoff for changing p-values to simply 'smaller than', e.g., p < 0.001.

test.input

Whether the input is tested for logical consistency. Warning: testing is not comprehensive. Setting test.input = FALSE will bypass logical tests.

factor.level.bullet

The character to be prepended to factor levels (listing). The default is factor.level.bullet = "- " (hyphen/minus) but it can be reset to any character string. If the result is passed on to html-rendering an en-dash can be produced by factor.level.bullet = "&#8211; " (HTML-code for the en-dash). Other useful options for (subsequent) HTML-rendering: factor.level.bullet = "&nbsp; &nbsp; " forces non-breaking space and effectively leads to indentation of factor levels; factor.level.bullet = "&#187; " prints right double angle quotes in HTML.

less.than.character

The character to be prepended to the cutoff-value for the p-values (e.g., '< 0.001'). The default is less.than.character = "< " but it can be reset to any character string. If the result is passed on to html-rendering this symbol can be produced by less.than.character = "&lt; " (HTML-friendly name for 'less than' since '<' is used in HTML-tags and might not render correctly as a character; e.g., when using function htmlTable() in the htmlTable-package).

linebreak.tag

Can be used to insert a linebreak-command in the table headers to bring the counts to a new line. The default is linebreak.tag = "" effectively not inserting any such command. For subsequent HTML-rendering linebreak.tag = "<br>" (HTML tag to insert a single line break) is useful.

Value

An R character-matrix containing the compiled table information.

Examples

1
BLtable(data = example_data, info = example_variables, group.var = "Group", test.input = TRUE)

FrThomas/risyphus documentation built on Dec. 6, 2019, 6:27 a.m.