| var_search | R Documentation |
A convenience wrapper around nhanesA::nhanesSearchVarName that
searches for variables by exact variable name match. The function
automatically converts input to uppercase to match NHANES naming conventions.
Use this when you know the variable code; use term_search() for
text-based searches.
var_search(var)
var |
Character. Variable name to search for. Will be automatically converted to uppercase. Not case-sensitive. |
A character vector of CDC table names containing the variable
(e.g., "DEMO", "DEMO_B", "DEMO_C").
Returns character(0) if the variable is not found.
term_search for text-based searches,
get_url for documentation URLs,
nhanesSearchVarName for the underlying function
Other search and lookup functions:
get_url(),
term_search()
# Search for specific variable (case-insensitive)
var_search("RIDAGEYR") # Age variable across all DEMO cycles
var_search("BPXSY1") # Systolic blood pressure
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.