Skip to navigation

Archive for January, 2010

My first RMySQL session

Thursday, January 21st, 2010

# ‘fai1’ is an empty MySQL database for which ‘mpromber’ has all privileges mycon

MySQL settings in ~/.my.cnf

Thursday, January 21st, 2010

You can specify default settings for MySQL in the file ~/.my.cnf (create it if it doesn’t exist). E.g., you could spare yourself typing your password each time you connect with an entry in that file like this: [client] password=’mypassword’ This gets loaded in addition to the system configuration file, which for me is at /etc/mysql/my.cnf.


Wednesday, January 20th, 2010

Memo to self: I installed RMySQL using sudo aptitude install r-cran-rmysql because when I used install.packages(“RMySQL”) it asked my to specify the MySQL libraries and headers and whatnot and don’t know where they are.

Use R to help with lottery drawing

Thursday, January 7th, 2010

When you start using R, it can be confusing that if you assign something to an object you do not get visual feedback: x x [1] 1 2 3 1 2 3 1 2 3 1 2 3 1 2 3 You can exploit this fact for doing a quick-and-dirty lottery. Assume you have a […]