Skip to navigation

Archive for the 'R' Category

R: Installing weaver to cache Sweave code chunks

Thursday, May 28th, 2009

The package weaver lets you cache code chunks in your .Rnw file so the computations don’t have to be repeated if you only make small changes to the document — potentially a huge timesaver. If you simply try to install it using install.packages(), you will get the message that the package weaver cannot be found. […]

R: lme4/ Matrix not finding “libRlapack.so”

Friday, March 20th, 2009

I had a problem in R when trying to load the package lme4 on Xubuntu Intrepid: > library(lme4) Loading required package: Matrix Loading required package: lattice Error in dyn.load(file, DLLpath = DLLpath, …) : unable to load shared library ‘/usr/local/lib/R/site-library/Matrix/libs/Matrix.so’: libRlapack.so: cannot open shared object file: No such file or directory Error: package ‘Matrix’ could […]

R: Logical operators: Beware of the difference between “&&” and “&”

Friday, September 12th, 2008

There’s a tricky bit about R‘s logical operators, and though it’s described in the help pages that you get when you type, for example, ?”&” I still fall from it from time to time. (I think it has to do with my rudimentary knowledge and usage of “&&” for if-statements in bash shell scripts. Below […]

Better buffer switching in Emacs

Tuesday, May 20th, 2008

I’ve switched from XEmacs to Emacs, about a month back. I like it much better. On Xubuntu, many more things work “out of the box” (for example the Noweb mode for Sweave). X clipboard contents are immediately available for yanking! One thing that’s always annoyed me in both XEmacs and Emacs was the buffer switching […]

Nicely formatted p values in Sweave

Thursday, May 15th, 2008

R function: pval