ONEtable: Function to compile ONE-table.

Description Usage Arguments Value Examples

View source: R/ONEtable.R

Description

Function to compile ONE-table.

Usage

1
2
3
ONEtable(data, info, sign.digits = 2, sign.digits.prop = 1,
  show.missing.info = TRUE, test.input = FALSE,
  factor.level.bullet = "- ", linebreak.tag = "")

Arguments

data

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

info

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

sign.digits

Digits used for mean, standard deviation, etc.

sign.digits.prop

Digits used for proportion of cases for factors (and missing entries, if requested).

show.missing.info

If show.missing.info = TRUE information about missing information in a variable is added to the table. show.missing.info = FALSE suppresses that information.

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 = "– " (HTML-code for the en-dash). Other useful options for (subsequent) HTML-rendering: factor.level.bullet = "    " forces non-breaking space and effectively leads to indentation of factor levels; factor.level.bullet = "» " prints right double angle quotes in HTML.

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
ONEtable(data = example_data, info = example_variables, show.missing.info = TRUE)

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