Learn R Programming

nhanesA (version 1.1)

nhanesFromURL: Parse NHANES doc URL

Description

Download an NHANES table from URL

Usage

nhanesFromURL(
  url,
  translated = TRUE,
  cleanse_numeric = TRUE,
  nchar = 128,
  adjust_timeout = TRUE
)

Value

data frame

Arguments

url

URL of XPT file to be downloaded

translated

logical, whether variable codes should be translated

cleanse_numeric

Logical flag. If TRUE, some special codes in numeric variables, such as ‘Refused’ and ‘Don't know’ will be converted to NA.

nchar

integer, labels are truncated after this

adjust_timeout

Typically a logical flag indicating whether the default download.file timeout option should be adjusted by taking into account the size of the file to be downloaded, as reported by the server. The value can also be a positive numeric value, in which case it is used as a further multiplicative factor for the default calculation.

Details

Downloads an NHANES table from a URL and returns it as a data frame