diff --git a/NEWS.md b/NEWS.md index e8d9fdb..1f5a7da 100644 --- a/NEWS.md +++ b/NEWS.md @@ -1,4 +1,9 @@ -Version 0.7.2 +Version 0.7.3 +================================================================================ + +- Updated nhanesTableVars to be compatible with pre-pandemic tables (thanks @lamisipam https://github.com/cjendres1/nhanes/issues/16). + +Version 0.7.2 ================================================================================ - Add includewithdrawn flag to nhanesSearchTableNames (thanks @Ifitrains https://github.com/cjendres1/nhanes/issues/15). Updated README. diff --git a/R/nhanes.R b/R/nhanes.R index 444d13b..523cf19 100644 --- a/R/nhanes.R +++ b/R/nhanes.R @@ -1031,8 +1031,8 @@ nhanesCodebook <- function(nh_table, colname, dxa=FALSE) { #' in a data frame. Only a single table may be specified, but multiple variables within that table #' can be selected. Code translations are retrieved for each variable. #' @examples -#' nhanesTranslate('DEMO_B', c('DMDBORN','DMDCITZN')) -#' nhanesTranslate('BPX_F', 'BPACSZ', details=TRUE) +#' \donttest{nhanesTranslate('DEMO_B', c('DMDBORN','DMDCITZN'))} +#' \donttest{nhanesTranslate('BPX_F', 'BPACSZ', details=TRUE)} #' \donttest{nhanesTranslate('BPX_F', 'BPACSZ', data=nhanes('BPX_F'))} #' @export #' diff --git a/man/nhanesTranslate.Rd b/man/nhanesTranslate.Rd index 88b4b77..aeb606f 100644 --- a/man/nhanesTranslate.Rd +++ b/man/nhanesTranslate.Rd @@ -45,7 +45,7 @@ in a data frame. Only a single table may be specified, but multiple variables wi can be selected. Code translations are retrieved for each variable. } \examples{ -nhanesTranslate('DEMO_B', c('DMDBORN','DMDCITZN')) -nhanesTranslate('BPX_F', 'BPACSZ', details=TRUE) +\donttest{nhanesTranslate('DEMO_B', c('DMDBORN','DMDCITZN'))} +\donttest{nhanesTranslate('BPX_F', 'BPACSZ', details=TRUE)} \donttest{nhanesTranslate('BPX_F', 'BPACSZ', data=nhanes('BPX_F'))} } diff --git a/vignettes/Introducing_nhanesA.R b/vignettes/Introducing_nhanesA.R index 2677cbe..1138b85 100644 --- a/vignettes/Introducing_nhanesA.R +++ b/vignettes/Introducing_nhanesA.R @@ -159,11 +159,14 @@ df ## ----prepan, eval=FALSE------------------------------------------------------- # #List all pre-pandemic tables # nhanesSearchTableNames('^P_') +# #List table variables +# nhanesTableVars('EXAM', 'P_AUX', namesonly=TRUE) # #List pre-pandemic EXAM tables # nhanesTables('EXAM', 'P') -# #Table import and variable translation operate as usual +# #Table import, variable translation, and codebook display operate as usual # p_dxxfem <- nhanes('P_DXXFEM') # nhanesTranslate('P_BMX', 'BMDSTATS') +# nhanesCodebook('P_INS', 'LBDINSI') ## ----nhanesdxa, eval=FALSE---------------------------------------------------- # #Import into R diff --git a/vignettes/Introducing_nhanesA.html b/vignettes/Introducing_nhanesA.html index e27fa13..d8bfa97 100644 --- a/vignettes/Introducing_nhanesA.html +++ b/vignettes/Introducing_nhanesA.html @@ -12,7 +12,7 @@ - +