Description Usage Arguments Details Value See Also Examples
This function generates a request form containing a list of all unique values of a particular key variable in a dataset selected, based on which users can specify their inclusion criteria for data extraction.
1 2 3 4 5 6 7 8 9 10 11 12 13 14 |
wkdir |
The path to working directory. See |
research.folder |
The name of research folder. See
|
table_name |
The name of dataset. File extension must be included if the data is saved as a flat file instead of in a database, e.g., 'data.csv' should be given instead of simply 'data'. |
data.type |
|
database |
Name of database. Should be either |
key.var |
The name of variable based on which inclusion criterion is specified. Vector with multiple elements is not allowed. To have complex inclusion criteria based on multiple variables, generate one request form for each variable. |
key.desc |
The name of variable(s) that describes |
identifier.var |
The name(s) of identifier variable(s) of the inclusion criterion. Multiple identifier variables should be specified as a character vector. |
count |
Whether a count summary should be generated for each of
|
overwrite |
Whether to overwrite existing request form. Default is
|
username |
User name for accessing database if |
password |
Password for accessing database if |
Writes an .xls
file with two sheets to
public_data_template
if lining to database, and to either
public_data_template
or private_data_template
depending on
database
for flat tables.
The first sheet overall list
contains unique values of key variable
with description (if key.desc
is specfied and exists in the table),
remarks and selection. This sheet will be used to specify inclusion criteria
for data extraction in later steps.
The second sheet setting list
contains detailed information about
the database.
Returns the name of inclusion criteria generated. See details
.
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 | ## Not run:
# Generate the inclusion criterion from public table `movement_table.txt`
# based on variable `DIAGNOSIS_CD`. `DIAGNOSIS_DESC` and `ICD_VERSION`
# contains detailed description for the key variable.
#
# Unique entries are identified by `PATIENT_NRIC` and `CASE_NO`.
# Unique `DIAGNOSIS_CD` is counted by `PATIENT_NRIC` and `CASE_NO`.
#
genInclusion(wkdir = "Working directory", research.folder = "requestnum001",
table_name = `movement_table.txt`, data.type = "flat",
database = "public",
key.var = "DIAGNOSIS_CD",
key.desc = c("DIAGNOSIS_DESC", "ICD_VERSION"),
identifier.var = c("PATIENT_NRIC", "CASE_NO"))
## End(Not run)
|
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.