View source: R/nhanes_search.R
| nhanesSearchVarName | R Documentation | 
Returns a list of table names that contain the variable
nhanesSearchVarName(
  varname = NULL,
  ystart = NULL,
  ystop = NULL,
  includerdc = FALSE,
  nchar = 128,
  namesonly = TRUE
)
| varname | Name of variable to match. | 
| ystart | Four digit year of first survey included in search, where ystart >= 1999. | 
| ystop | Four digit year of final survey included in search, where ystop >= ystart. | 
| includerdc | If TRUE then RDC only tables are included in list (default=FALSE). | 
| nchar | Truncates the variable description to a max length of nchar. | 
| namesonly | If TRUE then only the table names are returned (default=TRUE). | 
The NHANES Comprehensive Variable List is scanned to find all data tables that contain the given variable name. Only a single variable name may be entered, and only exact matches will be found.
By default, a character vector of table names that include the specified variable is returned. If namesonly=FALSE, then a data frame of table attributes is returned.
bmxleg = nhanesSearchVarName('BMXLEG')
length(bmxleg)
bmxhead = nhanesSearchVarName('BMXHEAD', ystart=2003)
length(bmxhead)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.