Skip to content

Commit

Permalink
Minor updates for CRAN submission
Browse files Browse the repository at this point in the history
  • Loading branch information
cjendres1 committed Feb 17, 2023
1 parent 451c80e commit 91eb677
Show file tree
Hide file tree
Showing 6 changed files with 16 additions and 10 deletions.
1 change: 1 addition & 0 deletions .Rbuildignore
Original file line number Diff line number Diff line change
@@ -1,2 +1,3 @@
^.*\.Rproj$
^\.Rproj\.user$
^README.Rmd
4 changes: 2 additions & 2 deletions DESCRIPTION
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
Package: nhanesA
Version: 0.7.2
Date: 2022-11-25
Date: 2023-02-17
Title: NHANES Data Retrieval
Authors@R:
person(given = "Christopher",
Expand All @@ -27,4 +27,4 @@ Suggests:
knitr,
rmarkdown
VignetteBuilder: knitr
RoxygenNote: 7.2.1
RoxygenNote: 7.2.3
5 changes: 5 additions & 0 deletions NEWS.md
Original file line number Diff line number Diff line change
@@ -1,3 +1,8 @@
Version 0.7.2
================================================================================

- Add includewithdrawn flag to nhanesSearchTableNames (thanks @Ifitrains https://github.com/cjendres1/nhanes/issues/15). Updated README.

Version 0.7.1
================================================================================

Expand Down
10 changes: 5 additions & 5 deletions R/nhanes.R
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
#nhanesA - retrieve data from the CDC NHANES repository
# Christopher J. Endres 09/18/2022
# Christopher J. Endres 02/15/2023
#
nhanesURL <- 'https://wwwn.cdc.gov/Nchs/Nhanes/'
dataURL <- 'https://wwwn.cdc.gov/Nchs/Nhanes/search/DataPage.aspx'
Expand Down Expand Up @@ -421,7 +421,7 @@ nhanes <- function(nh_table) {
#' @examples
#' \donttest{dxa_b <- nhanesDXA(2001)}
#' \donttest{dxa_c_s <- nhanesDXA(2003, suppl=TRUE)}
#' \donttest{nhanesDXA(1999, destfile="dxx.xpt")}
#' \dontrun{nhanesDXA(1999, destfile="dxx.xpt")}
#' @export
nhanesDXA <- function(year, suppl=FALSE, destfile=NULL) {

Expand Down Expand Up @@ -751,7 +751,7 @@ nhanesSearchTableNames <- function(pattern=NULL, ystart=NULL, ystop=NULL, includ
if(nrow(df)==0) {return(NULL)}
row.names(df) <- NULL
if(details==TRUE){
df$Data.File.Name <- str_sub(df$Data.File.Name, 1, nchar)
df$Data.File <- str_sub(df$Data.File, 1, nchar)
return(df)
} else {
return(unlist(strsplit(df$Doc.File, " Doc")))
Expand Down Expand Up @@ -892,8 +892,8 @@ nhanesSearchVarName <- function(varname=NULL, ystart=NULL, ystop=NULL, includerd
#' codebook information for the selected variable.
#' @return The codebook is returned as a list object. Returns NULL upon error.
#' @examples
#' nhanesCodebook('AUX_D', 'AUQ020D')
#' nhanesCodebook('BPX_J', 'BPACSZ')
#' \donttest{nhanesCodebook('AUX_D', 'AUQ020D')}
#' \donttest{nhanesCodebook('BPX_J', 'BPACSZ')}
#' @export
#'
nhanesCodebook <- function(nh_table, colname, dxa=FALSE) {
Expand Down
4 changes: 2 additions & 2 deletions man/nhanesCodebook.Rd

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion man/nhanesDXA.Rd

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

0 comments on commit 91eb677

Please sign in to comment.