I'm trying to work with a colleague on the CDC's NHAMCS 2011-2014 data, however he has SAS and I only have R (because it's free).
The data is supposed to be available here: https://www.cdc.gov/nchs/ahcd/ahcd_questionnaires.htm
However, it is formatted for SAS, SPSS, or STATA according to the documentation. The files are broken up in ways I've never seen before. I've previously been able to download files into R, but when I download the zip files here and try to then open them in R I get strings of meaningless characters and no column headers.
In the past I had successfully used the following code to get NHANES data:
tf <- tempfile()
download.file("https://wwwn.cdc.gov/Nchs/Nhanes/2013-2014/DEMO_H.XPT", tf, mode="wb")
DEMO <- read.xport(tf)
Is there a way to rework this for NHAMCS 2011-2014?