0

I'm attempting connect my Sequel Pro database to R. In Joseph Adler's "R in a Nutshell"- page 164- he lists various ODBC drivers for different databases, but I can't find one for Sequel Pro. Any help on which driver to use would be greatly appreciated.

Burton Guster
  • 2,213
  • 8
  • 31
  • 29
  • 1
    As far as I can tell, Sequel Pro is just a front end for MySQL, not a db itself. So you'd presumably connect using MySQL ODBC drivers in the same way you connected Sequel Pro to your MySQL server. – joran Mar 30 '12 at 17:38

1 Answers1

1

I don't have a Sequel Pro database, but here are the steps you would likely follow:

  1. Install the proper ODBC driver (http://dev.mysql.com/downloads/connector/odbc/)
  2. Add the database as an ODBC DSN. This is available in Windows in Administrative Tools -> Data Sources (ODBC). (Enable by right-clicking on Start Menu, "Customize...", and select one of the display options under "System administrative tools".) Add the database under "File DSN" (most likely) or "User DSN".
  3. Use R to open ODBC connection:

    library(RODBC)
    dsn <- "this is the dsn assigned in the windows tool"
    db <- odbcConnect(dsn)
    sqlQuery(db, "select * from whatever")
    sqlSave(db, df)
    

Data in df. Sorry I can't give you the exact process, but I don't have the necessary data.

attitude_stool
  • 1,023
  • 1
  • 13
  • 18