adt_tk_query: Query data frames

Description Usage Arguments Value Examples

View source: R/adt_toolkits.R

Description

Get the dictionary or dictionary data for creating new dictionary and checking variables meanings.

Usage

1
adt_tk_query(data, str = NULL, csv_fname = NULL)

Arguments

data

A dataset. Possible choices are "dict_tbl": the dictionary for the structure of tables, "dict_cil_name": the dictionary maps the original column names (old_col_name) to the column names of generated analysis dataset, "dict_data": This dictionary includes all the variables names in the analysis dataset. This dictionary could be used to check the location and description of each variable.

str

String to search. Default value is NULL. If NULL, this function is used to check the entire dictionary. If input a string (the variable name of the analysis dataset), this function is used to check the location and description of the variable.

csv_fname

A string indicating the CSV filename to be saved (saved to the default location). Default is NULL. The saved file is in .scv format. If changes of default dictionaries needed, then the costomized dictionary could be added here. However, the format of the costomized dictionary should follow the default one.

Value

The search result (either an entire dataset or the location and description of searched variable).

Examples

1
2
3
4
5
6
## Not run: 
adt_tk_query(dict_tbl)
adt_tk_query(dict_col_name, csv_fname = "col_name.csv")
adt_tk_query(dict_data, "waissmac")
adt_tk_query(dict_data, "MCIN1EX")
## End(Not run)

olssol/ADTool documentation built on Feb. 12, 2021, 3:49 a.m.