get_standard_table_inguinal: Get an individual standard table for inguinal patients for...

Description Usage Arguments Details Examples

View source: R/get_standard_table_inguinal.R

Description

Retrieves the code for the standard AHSQC table for inguinal patients specified and returns it in either a separate file or through a text string. Data must have appropriate derived variables.

Usage

1
2
get_standard_table_inguinal(tbl = NULL, data, print = FALSE,
  overwrite = FALSE, pval = FALSE)

Arguments

tbl

NULL or integer (1-9) to identify which table to return.

data

a data table

print

a boolean. If TRUE, the code for specified table will be returned in a tet string. If FALSE, the code for specified table will be written to a separate .R file in the working directory with tbln.R nomenclature.

overwrite

a boolean. If a .R file already exists for the table specified and set to TRUE, the file will be overwritten with original code.

Details

If overwrite = FALSE and a .R file exists for the specified table, the function will throw an error.

If print = TRUE, the overwrite argument will be ignored.

Examples

1
2
3
4
5
6
# Not run:
# d0 <- ahs_get_data()
# d1 <- d0[["analyticview"]] %>% filter(flg_opdetails_inguinal %in% "Yes")
# get_table(tbl = 1, d1, print = TRUE) ## will print code as text
# get_table(tbl = 9, d1, print = FALSE) ## will write tbl9.R
# get_table(tbl = 9, d1, print = FALSE, overwrite = TRUE) ## will overwrite tbl9.R

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