R function to download and format NHANES data