Connecting R to Sequel Pro

Florko

macrumors newbie
Original poster
Oct 4, 2012
3
0
Hey guys I am currently trying to connect Sequel Pro to R, I have been at it for a week now and have been trying so many things and downloaded a inch of other programs in an attempt to connect them and now I'm completely lost. I am new to this stuff. Please help!!
 

SrWebDeveloper

macrumors 68000
Dec 7, 2007
1,872
2
Alexandria, VA, USA
Pardon my ignorance as to the obvious, but what exactly is "R"?

Just a thought offered to the programming gods (not the OP) -- we regrettably live in a world of acronyms, some so silly it seems like a foreign language at times. But a single letter acronym? Have we come to this? R? :p
 

lucidmedia

macrumors 6502a
Oct 13, 2008
702
37
Wellington, New Zealand
Pardon my ignorance as to the obvious, but what exactly is "R"?

Just a thought offered to the programming gods (not the OP) -- we regrettably live in a world of acronyms, some so silly it seems like a foreign language at times. But a single letter acronym? Have we come to this? R? :p
In the context of programming languages, the only single letter names NOT in use according to Wikipedia are (not counting things like ++, # or ! in the name):

A
H
I
N
O
P
U
V
W
X

of course, all of these languages were named before google. New languages are being given far more searchable names.

R is a language for statistical computing and graphing. It is a derivative of S which has been around since the mid 1970s. You can use languages like C and C++ to manipulate R objects.
 

SrWebDeveloper

macrumors 68000
Dec 7, 2007
1,872
2
Alexandria, VA, USA
Lucidmedia - that was rhetorical, unless you truly are one of the programming gods. ;) Just for kicks, I looked up "B" and assumed it was short for BASIC but found out it was a actually a code base for mainframes developed by Bell Labs in 1969 and is nearly extinct as it has been replaced by no other than it's alphabetical successor, C. OK? GTG!

(kidding with you and the OP all along) :cool:

Seriously, back to the OP's actual question, I was able to find this for you (ODBC driver as Data Source, similar to Cold Fusion and Oracle connectivity in my experience, but no direct experience with R so hope this at least gets you in the right direction):

Install the proper ODBC driver (http://dev.mysql.com/downloads/connector/odbc/)
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".
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.
Source: http://stackoverflow.com/questions/9947797/odbc-driver-to-connect-sequel-pro-to-r

-jim
 

Florko

macrumors newbie
Original poster
Oct 4, 2012
3
0
I had previously found that same program but my mac is a 10.7 while the most upgraded verso not that program is 10.6 and when I download it I can't seem to get it to run.

thanks for your help
 

Florko

macrumors newbie
Original poster
Oct 4, 2012
3
0
So I guess a new question would be how to I open ODBC connector.. It downloads as a TAR file
 

SrWebDeveloper

macrumors 68000
Dec 7, 2007
1,872
2
Alexandria, VA, USA
So I guess a new question would be how to I open ODBC connector.. It downloads as a TAR file
On a Mac? Assuming you don't have any popular GUI archiver installed:

Open a terminal window (Applications -> Utilities -> Terminal.app) then go into the directory where it lives and type in the command "tar xopf file.tar" to open the tar file. The contents will be extracted to the directory that contains the tar file.

Otherwise have you tried to simply open the file via a Finder window? If that doesn't work then download GUI tar at http://www.macupdate.com/app/mac/14503/gui-tar which is easy to use.
 
Register on MacRumors! This sidebar will go away, and you'll see fewer ads.