# Include Foreign Package To Read SAS Transport Files library(foreign) # Create Temporary File To Store Downloaded SAS Transport File tf <- tempfile() # Download NHANES 2001-2002 Blood Pressure Exam To Temporary File download.file("ftp://ftp.cdc.gov/pub/Health_Statistics/NCHS/nhanes/2001-2002/BPX_B.xpt", tf, mode="wb") # Create Data Frame From Temporary File BPX_B <- read.xport(tf)