findVars | R Documentation |
Provide a list of search terms to find variables in the data dictionary.
findVars(
...,
logic = "any",
ignore.case = TRUE,
perl = FALSE,
fixed = FALSE,
whole.word = FALSE,
dictionary = "both"
)
... |
Search terms |
logic |
Conditions for the search strings, can be "all", "any", or "none". Set to "any" by default. |
ignore.case |
Should search terms be case sensitive? Defaults to TRUE. |
perl |
logical. Should perl-compatible regexps be used? Defaults to FALSE. |
fixed |
logical. If 'TRUE', 'pattern' is a string to be matched as is. Overrides all conflicting arguments. Defaults to FALSE. |
whole.word |
If 'TRUE' search term "word" will be changed to "\bword\b" to only match whole words. Defaults to FALSE. |
dictionary |
Data frame or name of a data dictionary. Dictionaries available by default are
"current" (from the R:/Data/Current folder), "useful" (from the R:/Data/Useful_data folder) and "both" (combined "current" and "useful").
New dictionaries can be created using the |
The resulting data frame will have the following columns:
obj - The name of the data file
name - The name of the variable
type - The type of data for the variable
lab - A description of the label
code - The ALSPAC dictionary code for the variable
counts - The number of non-NA values in the variable
cat1-4 - These columns correspond to the folder names that the objects were found in
A data frame containing a list of the variables, the files they originate from, and some descripton about the files
## Not run:
# Find variables with BMI or height in the description (this will return a lot of results!)
bmi_variables <- findVars("bmi", "height", logic="any", ignore.case=TRUE)
## End(Not run)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.