-
Notifications
You must be signed in to change notification settings - Fork 1
NHANEStoMySQL
Tim Erickson edited this page May 14, 2019
·
7 revisions
The NHANES site lets you download SAS transport files (.xpt). But for our system to use them, we need them in MySQL (or some other database that we will access from CODAP/JS).
Do this is RStudio. Here is example code:
bp <- read_xpt("BPX_I.xpt")
fwrite(bp, file="bp.csv")
Using Sequel Pro, choose File\Import and select the .csv. Check that the column headings are correct; the most common mistake for me has been to fail to indicate that this is going to be a new table.