Query a MySQL Database from R using RMySQL
I use this all the time, and the setup is dead simple. Follow the code below to load the RMySQL package, connect to a database (here the UCSC genome browser’s public MySQL instance), set up a function to make querying easier, and query the database to return results as a data frame.
To leave a comment
for the author, please follow the link and comment on their blog: Getting Genetics Done
offers daily e-mail updates
news and tutorials
on topics such as: visualization (ggplot2
), programming (RStudio
, Web Scraping
) statistics (regression
, time series
) and more...
If you got this far, why not subscribe for updates
from the site? Choose your flavor: e-mail
, or facebook