tag:blogger.com,1999:blog-6232819486261696035.post4441580376952065191..comments2023-09-25T09:01:44.323-05:00Comments on Getting Genetics Done: Query a MySQL Database from R using RMySQLStephen Turnerhttp://www.blogger.com/profile/06656711316726116187noreply@blogger.comBlogger5125tag:blogger.com,1999:blog-6232819486261696035.post-14720044144033392042015-12-01T14:18:16.019-06:002015-12-01T14:18:16.019-06:00Hi Stephen!
I'm working on a project to regr...Hi Stephen! <br /><br />I'm working on a project to regress NFL data in R but we have a database we are pulling from in MySQL. I'm following your instructions, but what do I use instead of "genome" and "genome...edu" for my user and host?<br /><br />Thanks!<br />AndrewAnonymoushttps://www.blogger.com/profile/10279483031636136232noreply@blogger.comtag:blogger.com,1999:blog-6232819486261696035.post-84235347547870080352012-03-05T19:49:39.033-06:002012-03-05T19:49:39.033-06:00Try something like:
query("SELECT * FROM tab...Try something like:<br /><br />query("SELECT * FROM table;")$yourvariable<br /><br />or <br /><br /><br />query("SELECT * FROM table;")[[1]]Stephen Turnerhttps://www.blogger.com/profile/06656711316726116187noreply@blogger.comtag:blogger.com,1999:blog-6232819486261696035.post-61980039517147880902012-03-05T18:37:54.546-06:002012-03-05T18:37:54.546-06:00Hello Stephen!
Can I ask you a question?
When you ...Hello Stephen!<br />Can I ask you a question?<br />When you do a query to a database, like you did above, is it possible to pass the data directly to a vector?<br />I wanna use the data and create a plot/graphic.Anonymousnoreply@blogger.comtag:blogger.com,1999:blog-6232819486261696035.post-18584370196917377332012-01-24T13:25:45.743-06:002012-01-24T13:25:45.743-06:00George, see if this helps. If not, I'll see if...George, see if <a href="http://www.stat.berkeley.edu/classes/s133/RMySQL_windows.html" rel="nofollow">this</a> helps. If not, I'll see if I can get Will (a Windoze guy) to post about how to do this. You'll have to use the RODBC package, and set up a connection to your database server through My Computer --> Administrative Tools --> Data Sources. But it's been way too long since I've done this, and I don't have a PC to test it out on or give you any screenshots. RMySQL is definitely easier and more "portable" if you can get it to work.Stephen Turnerhttps://www.blogger.com/profile/06656711316726116187noreply@blogger.comtag:blogger.com,1999:blog-6232819486261696035.post-30050453592566013102012-01-24T11:50:57.848-06:002012-01-24T11:50:57.848-06:00Hello Stephen, I´d like to talk to you about how y...Hello Stephen, I´d like to talk to you about how you installed RMySQL, I´m a windows user and this packege is not compiled for windows yet. Could you help me please? My name is George.Anonymousnoreply@blogger.com