Tag Archives: R

Build 32 bit R on 64 bit Ubuntu by utilizing chroot

In the past, I’ve described how one could build multiarch (64 bit and 32 bit) versions of R on a 64 bit Ubuntu machine. The method based on this thread no longer works as of R 2.13 or 2.14 I believe. I received advice from someone on #R over on freenode (forgot who) a few read more »

Build multiarch R (32 bit and 64 bit) on Debian/Ubuntu

I have the 64 bit version of R compiled from source on my Ubuntu laptop. I recently had a need for R based on 32 bit since a package I needed to compile and use only works in 32 bit. I thought it was readily available on Ubuntu since both 32 bit and 64 bit read more »

R from source

The following are notes for myself. I like to use the [bleeding edge](http://cran.r-project.org/doc/manuals/R-admin.html#Using-Subversion-and-rsync) version of [R](http://www.r-project.org/):

My own programming style convention for most languages

I write code mainly in R, and from times to times, in C, C++, SAS, bash, python, and perl. There are style guides out there that help make your code more consistent and readable to yourself and others. [Here](http://geosoft.no/development/cppstyle.html) is a style guide for C++, and [here](http://google-styleguide.googlecode.com/svn/trunk/google-r-style.html) is Google’s style guide for R and [here](http://had.co.nz/stat405/resources/r-style-guide.html) read more »

serialize or turn a large parallel R job into smaller chunks for use with SGE

I use the [snow](http://cran.r-project.org/package=snow) package in R with [OpenMPI](http://www.open-mpi.org/) and [SGE](http://www.sge.com/) quite often for my simulation studies; I’ve [outlined](http://blog.nguyenvq.com/2010/01/20/scheduled-parallel-computing-with-r-r-rmpi-openmpi-sun-grid-engine-sge/) how this can be done in the past. The ease of [these](http://blog.nguyenvq.com/2010/01/20/scheduled-parallel-computing-with-r-r-rmpi-openmpi-sun-grid-engine-sge/) methods make it so simple for me to just specify the maximum number of cores available all the time. However, unless you own your read more »

Determining number of nodes or cores available in an SGE Queue

To determine the status of a queue in SGE, one can issue the command `qstat -g c` to get such information like number of CPU available and the current CPU and memory load. However, this information can be misleading when nodes can be cross-listed in multiple Q’s. A Q can say X number of nodes read more »

Compile R on Mac OS X

I did this before on my Macbook, but never documented. Wanted to document my attempt on the [Mac virtual machine](http://blog.nguyenvq.com/2010/12/04/mac-os-x-in-linux-via-virtualbox-as-guest-os/). 1. Install Xcode (gcc/g++) and gfortran per [this](http://r.research.att.com/tools/) site. 2. Download the [R](http://www.r-project.org/) source file (2.12 in this example), and extract it. 3. `./configure` did not work (Fortran issue). Per [this](http://r.research.att.com/building.html), [this](http://www.mail-archive.com/r-sig-mac@stat.math.ethz.ch/msg04277.html), and [this](http://cran.r-project.org/doc/manuals/R-admin.html#Installing-R-under-Mac-OS-X), I read more »

Creating even NICER, publishable, embeddable plots using tikzDevice in R for use with LaTeX

It’s true. I like to do my work in [R](http://www.r-project.org/) and write using [LaTeX](http://www.latex-project.org/) (well, I prefer to use [org-mode](http://orgmode.org/) for less formal writing and/or if I don’t have to typeset a lot of math). I haven’t done a lot of LaTeX’ing or [Sweaving](http://www.stat.uni-muenchen.de/~leisch/Sweave/) in the last year since 1) I’ve been collaborating with scientists read more »

S4 classes in R: printing function definition and getting help

I’m not very familiar with S4 classes and methods, but I assume it’s the recommended way to write new packages since it is newer than S3; this of course is open to debate. I’ll outline my experience of programming with S4 classes and methods in a later post, but in the mean time, I want read more »

Managing a statistical analysis project – guidelines and best practices

Had to share [this](http://www.r-statistics.com/2010/09/managing-a-statistical-analysis-project-guidelines-and-best-practices/) link today as I better read all the content it refers to and incorporate a lot of the recommended practices into my work flow. Thanks Tal Galili for compiling all those information.