Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

add withdrawl argument to nhanesSearchTableNames #15

Closed
Ifitrains opened this issue Nov 22, 2022 · 3 comments
Closed

add withdrawl argument to nhanesSearchTableNames #15

Ifitrains opened this issue Nov 22, 2022 · 3 comments
Assignees

Comments

@Ifitrains
Copy link

nhanesA::nhanesSearchTableNames("PAHS", details = TRUE) returns,

      Years                                                  Data.File.Name   Doc.File
1 2011-2012        Polyaromatic Hydrocarbons (PAHs)- Urine - Special Sample PAHS_G Doc
2 2013-2014 Polycyclic Aromatic Hydrocarbons (PAH) - Urine - Special Sample PAHS_H Doc
3 2015-2016 Polycyclic Aromatic Hydrocarbons (PAH) - Urine - Special Sample PAHS_I Doc
                     Data.File Date.Published
1   PAHS_G Data [XPT - 426 KB]  February 2014
2 PAHS_H Data [XPT - 354.6 KB]      **Withdrawn**
3 PAHS_I Data [XPT - 310.7 KB]      July 2020

Withdrawn datasets are not really useful and cannot be downloaded from the nhanes() function, so it would be very nice to have an option to automatically remove withdrawn datasets from the search.

@Ifitrains Ifitrains changed the title add withdrawl argument to nhanessearchtable add withdrawl argument to nhanesSearchTableNames Nov 22, 2022
@cjendres1 cjendres1 self-assigned this Nov 22, 2022
@cjendres1
Copy link
Owner

Thanks for submitting this. I'll take a look but may not get to it until after Thanksgiving.

@cjendres1
Copy link
Owner

Just pushed a fix to git.
nhanesSearchTableNames now has option includewithdrawn.

Please install the update using: install_github("cjendres1/nhanes")
It will install as nhanesA 0.7.2

By default, includewithdrawn=FALSE. Thus Withdrawn tables should not show up when you run your previous command.
nhanesSearchTableNames("PAHS", details = TRUE)

Please test the function with these commands:

nhanesSearchTableNames("PAHS",  includewithdrawn = TRUE, details = TRUE) 
nhanesSearchTableNames("PAHS",  includewithdrawn = FALSE, details = TRUE)

@cjendres1
Copy link
Owner

Fix included in nhanesA 0.7.2

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants