View source: R/nhanes_search.R
nhanesSearchTableNames | R Documentation |
Returns a list of table names that match a specified pattern.
nhanesSearchTableNames(
pattern = NULL,
ystart = NULL,
ystop = NULL,
includerdc = FALSE,
includewithdrawn = FALSE,
nchar = 128,
details = FALSE
)
pattern |
Pattern of table names 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 (default=FALSE). |
includewithdrawn |
IF TRUE then withdrawn tables are included (default=FALSE). |
nchar |
Truncates the variable description to a max length of nchar. |
details |
If TRUE then complete table information from the comprehensive data list is returned (default=FALSE). |
Searches the Doc File field in the NHANES Comprehensive Data List (see https://wwwn.cdc.gov/nchs/nhanes/search/DataPage.aspx) for tables that match a given name pattern. Only a single pattern may be entered.
Returns a character vector of table names that match the given pattern. If details=TRUE, then a data frame of table attributes is returned. NULL is returned when an HTML read error is encountered.
bmx = nhanesSearchTableNames('BMX')
length(bmx)
hepbd = nhanesSearchTableNames('HEPBD')
dim(hepbd)
hpvs = nhanesSearchTableNames('HPVS', includerdc=TRUE, details=TRUE)
dim(hpvs)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.