tabSource: Data Frame for Tabulation in Auto Reporting

Description Usage Arguments Details Value Author(s)

Description

Draw a prevalence table with raw data combining with summarized data, in addition with table controlling parameters. The parameter pool data frames are yielded using setRptParam().

Usage

1
2
3
4
5
tabSource(data, imput = NULL, riskvar, xvar, yvar, xvar.imput = xvar,
  yvar.imput = yvar, tblRisk, tblBU, tblGender, tblCity, digits = 1,
  lang = c("cn", "en"), row_levels = NULL, col.levels = NULL,
  sort = list(col = 1, desc = FALSE),
  na.string = getOption("na.string"), ...)

Arguments

data

Raw dataset

imput

Summarized data set

riskvar

The risk variable

xvar

Variable name of x in raw data set.

yvar

Variable name of y in raw data set.

xvar.imput

Variable name of x in summarized data set.

yvar.imput

Variable name of y in summarized data set.

tblRisk

Data frame of risk pool.

tblBU

Data frame of BU pool.

tblGender

Data frame of gender pool.

tblCity

Data frame of city pool.

digits

Number of digits in results.

lang

Language, 'cn' or 'en'.

row_levels

A vector re-defining the factor level of the variable to be put as the raw. Default null. If 'asis', keep the original order; if 'NULL', reorder the columns; if a specific vector, sort columns by that order.

col.levels

A vector re-defining the factor level of the variable to be put as the column. Default null.

sort

Sorting standard. If sort=list(col=1, desc=FALSE), then the function sorts the data ascendingly by Col1. If sort=list(col=3, desc=TRUE), the function sorts the data descendingly by Col3. You can also directly assign a vector, e.g. list(col=1, val=1:4).

na.string

A named vector c(cn=..., en=...). How to present NAs when lang is EN or CN. Default getOption("na.string").

...

ignore

Details

It is more universal than tabEpiPrev().

Value

A data frame restructured based on you requirements.

Author(s)

Yiying Wang, wangy@aetna.com


madlogos/asesrpt documentation built on June 26, 2019, 12:17 a.m.