-
Notifications
You must be signed in to change notification settings - Fork 14
Open
Description
nhanes() fails gracefully when internet is unavailable, but not all other functions do:
> nhanes('AUX_D')
Data set AUX_D is not available
NULL
> nhanesCodebook('AUX_D')
URL https://wwwn.cdc.gov/Nchs/Data/Nhanes/Public/2005/DataFiles/AUX_D.htm does not seem to exist
URL https://wwwn.cdc.gov/Nchs/Nhanes/limited_access/AUX_D.htm does not seem to exist
Error in nhanesCodebook("AUX_D") : could not find a web page for AUX_D
> nhanesTableSummary('DEMO_D', use = "codebook")
URL https://wwwn.cdc.gov/Nchs/Data/Nhanes/Public/2005/DataFiles/DEMO_D.htm does not seem to exist
URL https://wwwn.cdc.gov/Nchs/Nhanes/limited_access/DEMO_D.htm does not seem to exist
Error in nhanesCodebook(nh_table, ...) :
could not find a web page for DEMO_D
> nhanesDXA(2001)
Error in curlGetHeaders(url) : libcurl error code 6:
Could not resolve host: wwwn.cdc.gov
> nhanesFromURL("https://wwwn.cdc.gov/Nchs/Data/Nhanes/Public/2007/DataFiles/VIX_E.xpt")
Error in curlGetHeaders(url) : libcurl error code 6:
Could not resolve host: wwwn.cdc.gov
> nhanesTranslate('DEMO_B', c('DMDBORN','DMDCITZN'))
URL https://wwwn.cdc.gov/Nchs/Data/Nhanes/Public/2001/DataFiles/DEMO_B.htm does not seem to exist
Error in UseMethod("xml_find_all") :
no applicable method for 'xml_find_all' applied to an object of class "NULL"
For now, I will put these examples inside try(), but we should review and fix these if necessary.
Reactions are currently unavailable
Metadata
Metadata
Assignees
Labels
No labels