tables: Make a frequency tabulation

table_multioptR Documentation

Make a frequency tabulation

Description

Make a frequency tabulation

Make a frequency tabulation that for variables with Yes/No responses

Usage

table_multiopt(
  data,
  dictionary = NULL,
  indices,
  use.regex = getOption("use.regex"),
  data.only = FALSE,
  redcap = getOption("data.on.redcap"),
  ...
)

table_singleopt(data, x, y = NULL, table.only = FALSE, data.only = FALSE)

table_yesno(data, col, data.only = FALSE, ...)

Arguments

data

The data

dictionary

The data dictionary

indices

Numeric vector representing indices of columns chosen

use.regex

Logical; whether to use label patterns to determine what the options should be for the responses

data.only

Return only the data.frame?

redcap

Logical. Is the project where the function is being used one for which the data were stored on REDCap?

...

Additional response options, if they exist.

x, y

An integer or character vector of length 1L for selecting a column from data.

table.only

Logical

col

The column with the responses

Value

An object of class flextable (or when table.only is TRUE an object of class table).

Note

To control what happens via the use.regex argument, the project has to set this option, ideally in the local .Rprofile to a desired value. For instance, to set a project-wide default value of FALSE for this argument, set options(use.regex = FALSE), and that way, there is no need to set the argument, each time the function is called.


BroVic/raampGBV documentation built on Oct. 7, 2022, 11:06 p.m.