Friday, January 8, 2010

multifactorial plotting in R: lattice

I've mentioned before in personal communications that if you have lots of factors in a data set you can just flatten out the data set and then use openoffice data pilot to pivot around different factors (also can be done in ruby with Ruport and 'pivot'). This is a good method.

There is a much better method I recently came across: "trellis plots". The package in R is called lattice.

This is clearly the way to quickly and neatly plot multifactorial data in lots of meaningful ways.

Some resources:
In R (as sudo if you want system wide installation):
install.packages("lattice", dependencies=TRUE)  # I don't think there are any dependencies

Monday, January 4, 2010

pymix compilation errors on Ubuntu

pymix was a little tricky to compile. Here's what I did to get it working.

I downloaded and installed numpy [but that is probably not necessary].

Then I finally had to go into pymix's and change the location for where it was looking for arrayobject.h:
numpypath = prefix + '/lib/python' +pyvs + '/site-packages/numpy/core/include/numpy' # path to arrayobject.h
numpypath = '/usr/share/pyshared/numpy/core/include/numpy' # path to arrayobject.h

At this point, 'python build' worked, but the install failed with this error:

byte-compiling /usr/local/lib/python2.6/dist-packages/ to AminoAcidPropertyPrior.pyc
SyntaxError: ('invalid syntax', ('/usr/local/lib/python2.6/dist-packages/', 170, 14, ' as = alpha.pop(0)\n'))

turns out that 'as' is a reserved keyword in python 2.6, so you need to go in to that file and change it to something else, like: nada = alpha.pop(0)