Skip to navigation

Archive for the 'R' Category

ggplot2 error “invalid argument to unary operator”

Monday, August 8th, 2011

I had a longish ggplot command and kept getting the error: invalid argument to unary operator It happened when I was specifying custom labels with scale_y_continuous but it turns out this was irrelevant and it hinged on a line break. It turnsout (at least when stepping through the code with ESS in Emacs using C-c [...]

How not to ask a question on R-help

Friday, February 12th, 2010

One great way to get help with R is by asking a question on the r-help mailing list. More often than not I have actually figured out the answer simply by typing up the question, because that made me think more clearly about what the problem really was. The people on the list are exceedingly [...]

R: loops vs apply (vectorization)

Wednesday, February 10th, 2010

A helpful article in by Uwe Ligges and John Fox in R news 2008(1), pp 46-50, about loops vs. apply was just pointed out on R-help. I’ve uploaded it here (pdf).

My first RMySQL session

Thursday, January 21st, 2010

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

r-cran-rmysql

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.