generate_standard_tables_all: Generate standard AHSQC tables

Description Usage Arguments Details Examples

View source: R/generate_standard_tables_all.R

Description

Generates standard AHSQC tables in HTML for .Rmd files. generate_standard_tables will print standard tables with no changes by default. If changes to individual tables are desired, they can be made with get_standard_table using separate .R files in the working directory.

Usage

1
2
generate_standard_tables_all(changes = FALSE, data, date,
  format = "rmd", module = "ventral", display = TRUE)

Arguments

changes

a boolean. Set to TRUE to indicate that changes have been made to at least one table.

data

a data table.

format

a string that describes the output format. Currently only "shiny" or "rmd". Default is "rmd"

module

a string that indicates which data module, ventral or inguinal, is used to create tables. Set to "ventral" for ventral module and "inguinal" for inguinal table. Once cannot generate tables for ventral and inguinal modules together.

out

empty vector

x

variable for row in table

dt

data table

xlab

Label for entry in table

out

empty vector

x

variable for row in table

dt

data table

xlab

Label for entry in table

pvalue

Boolean

fmt

Two values are "norm_fmt" or "count_fmt"

pvalue_fmt

A function that takes a pvalue and a test method

out

empty vector

dt

data table

fill

string

Details

Function returns the standard set of tables for the AHSQC in HTML code.

If changes = TRUE, the code for each table should be in individual .R files with the tbln.R nomenclature (ex. tbl1.R, tbl2.R, etc.) should be stored in the working directory. The function get_standard_table will do this.

Examples

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
# Not run:
# d0 <- ahs_get_data()
# d1 <- d0[["analyticview"]]
# generate_standard_tables(dt = d1, y = "e_gender")
Creates an entry with number of unique observations

# Not run:
Creates a categorical entry for a table

# Not run:
Creates an empty entry in table

# Not run:

thomasgstewart/ahsqc documentation built on Jan. 24, 2021, 11:19 a.m.