Friday, April 17, 2009

Poster using LaTeX

This is the style I like:

Linux on laptop

This article compares performance & experience of five Linux distros on laptop and picks Mint as the best one:

Playing .ape music under Linux

I am pleasantly surprised to find out that Mplayer can play .ape format music.

Monday, April 13, 2009

Rjags on 64-bit Linux

Use this: install.packages("rjags",configure.args="--with-jags-lib=/usr/local/lib")

Sunday, April 12, 2009

Best introduction to Bayesian statistics

Chapter 3 of Scott Lynch's book "Introduction to applied Bayesian statistics and estimation for social scientists" is the best introductory materials of the Bayesian statistics.


Here is a helpful post:

Saturday, April 11, 2009

Rebuild R libraries for the new version

After upgrading to a new version of R, type "update.packages(checkBuilt =TRUE, ask=FALSE)" to rebuild all the libraries currently present in the system.
To install from Gary King's repository, just type "install.packages("Zelig", repos = "")"

To build R, use "./configure --enable-R-shlib" or

./configure --enable-R-shlib CXXFLAGS="-g -O3" CFLAGS="-g -O3"
./configure --enable-R-shlib  --with-blas="-lptf77blas -lpthread -latlas" CXXFLAGS="-g -O3"

With OpenBLAS:

./configure --enable-R-shlib  --with-blas="-lpthread -lopenblas" CXXFLAGS="-g -O3"

Or with Intel MKL:

./configure --enable-R-shlib --enable-threads=posix --with-lapack --with-blas="-I$MKLROOT/include -L$MKLROOT/lib/intel64 -lmkl_gf_lp64 -lmkl_gnu_thread -lmkl_lapack -lmkl_core -liomp5 -lpthread" CXXFLAGS="-g -O3"

In case R cannot find the tcltk files, use this " ./configure --enable-R-shlib --with-tcl-config=/usr/lib/tcl8.5/ --with-tk-config=/usr/lib/tk8.5/". This suddenly became necessary when I tried to compile the release candidate version of R 2.14 today. The solution was provided by this blog post.

This may yield even better results: ./configure --enable-R-shlib --with-tcl-config=/usr/lib/tcl8.5/ --with-tk-config=/usr/lib/tk8.5/ --with-blas="-lptf77blas -lpthread -latlas"

To fulfill build dependency, use "sudo apt-get build-dep r-cran-rgl"





MKL=" -L${MKL_LIB_PATH}   -L${OMP_LIB_PATH} -Wl,--start-group -lmkl_gf_lp64 -lmkl_intel_thread -lmkl_core -Wl,--end-group -liomp5 -lpthread"

./configure --enable-R-shlib --enable-threads=posix --with-blas="$MKL" --with-lapack CXXFLAGS="-g -O3"

Thursday, April 09, 2009

Open source mind mapping

Mind mapping is an important part of research. As far I know, there are two open source options: freemind and xmind. I use both but prefer xmind because it is built on the Eclipse framework and is more elegant than freemind at the moment. If I need more functionalities such as exporting to Word or Powerpoint, I can upgrade to the professional edition with less than $50 per year.

I chose to install it on top my existing Eclipse instead of using the .deb binary file so that I do not have to leave Eclipse just for mind mapping.

Thursday, April 02, 2009

Sams Teach Yourself Emacs in 24 Hours

Good reference for Emacs.