Tag Archives: mysql

Querying Databases in R

One of the first things you’ll want to do in R is set it up to talk to databases. The easiest way to do this is using ODBC, via package RODBC. To get the package, run > install.packages(RODBC) Once you … Continue reading

Posted in Data Munging, R, R Tip | Tagged , , , , , | Leave a comment

MySQL, Batch Imports, and Rails

I really love Rails, but it’s not the most performant code in the world. Though it doesn’t often arise in CRUD programming, if you do any sort of stats, ML, or data analytics, you’ll frequently find yourself wanting to import … Continue reading

Posted in Data Munging | Tagged | Leave a comment

Writing MySQL Query Results to Disk

Notes to myself: how to easily write query results to disk using mysql. mysql -h main-backup.local -u earl -e “select count(*) from adsense_analytics_days;” -p collegelist_development > csvname.csv; where h specifies the name of the mysql server, u the username, e … Continue reading

Posted in Data Munging | Tagged , , | 1 Comment