Blog Archives

R: parallel processing using multicore package

April 14, 2010
By

I have been meaning to look at adding some parallel processing to R as I have some scripts that are painfully slow and embarrassingly parallel. There seem to be a lot of packages around for doing parallel computing, listed here.I decided to look at mul...

Read more »

R: heatmaps with gplots

April 8, 2010
By
R: heatmaps with gplots

I use heatmaps quite a lot for visualizing data, microarrays of course but also DNA motif enrichment, base composition and other things. I particular like the heatmap.2 function of the gplots package. It has a couple of defaults that are a little ugly ...

Read more »

R: heatmaps with gplots

April 8, 2010
By
R: heatmaps with gplots

I use heatmaps quite a lot for visualizing data, microarrays of course but also DNA motif enrichment, base composition and other things. I particular like the heatmap.2 function of the gplots package. It has a couple of defaults that are a little ugly ...

Read more »

R tip: Finding the location of minimum and maximums

February 26, 2010
By

I can never remember this R command, so I am going to post it here which probably means I will always remember it and never have to look it up here again.I sometimes want to find the location of a minimum or maximum value in a vector, so I can look up the corresponding position in another vector, or...

Read more »

R tip: Finding the location of minimum and maximums

February 26, 2010
By

I can never remember this R command, so I am going to post it here which probably means I will always remember it and never have to look it up here again.I sometimes want to find the location of a minimum or maximum value in a vector, so I can look up the corresponding position in another vector, or...

Read more »

Sweave in TeXShop

December 21, 2009
By

I love using TeXShop for GUI editing of LaTeX and particularly Sweave documents, but it is a pain not being able to get it to automatically generate the pdf output. Luckily I found this post which explains how to add a Sweave engine.Basically, make a f...

Read more »

Sweave in TeXShop

December 21, 2009
By

I love using TeXShop for GUI editing of LaTeX and particularly Sweave documents, but it is a pain not being able to get it to automatically generate the pdf output. Luckily I found this post which explains how to add a Sweave engine.Basically, make a f...

Read more »

R tip: Extracting median from survfit object

November 17, 2009
By

A colleague wanted to extract the median value from a survival analysis object, which turned out to be a pain as the value is not stored in the object, but calculated on the fly by a print method. > library(survival)> fit > survfit(fit)Call: survfit(formula = fit)records n.max n.start events median 0.95LCL 0.95UCL ...

Read more »

R tip: Extracting median from survfit object

November 17, 2009
By

A colleague wanted to extract the median value from a survival analysis object, which turned out to be a pain as the value is not stored in the object, but calculated on the fly by a print method.> library(survival)> fit > survfit(fit)Call: survfit(formula = fit)records n.max n.start events median 0.95LCL 0.95UCL ...

Read more »

RSPerl : Using R from within Perl

October 23, 2009
By

Some things I write in perl some in R, sometime I use perl to write R and run R. One thing that I find very useful is the functionality of RSPerl which enables you to call R functions from within perl and on perl variables. It can also call perl from R, though I have no idea why...

Read more »