Monthly Archives: November 2008

First and easy steps with R and Sweave

November 28, 2008
By
First and easy steps with R and Sweave

What really sold me to the idea of using Sweave and therefore (re)learning LaTeX was the idea of Reproducible Research. Charlie Geyer has put together some examples how to mix and match R and LaTeX with Sweave. Today's goal therefore is to run his exam...

Read more »

Sweave.sh plays with cacheSweave

November 26, 2008
By
Sweave.sh plays with cacheSweave

I have added support for caching to Sweave.sh script as implemented in cacheSweave R package written by Roger D. Peng. Now, one can set caching on for chunks that are time consuming (data import, some calculations, ...) and the Sweaving process will r...

Read more »

Calculating an N50 from Velvet output

November 25, 2008
By
Calculating an N50 from Velvet output

In sequencing circles the N50 length is a useful heuristic for judging the quality of an assembly. Here is my definition of N50 length, which you may or may not find intuitive:N50 length is the length of the shortest contig such that the sum of contigs...

Read more »

Use anchoring to lose years off your age

November 21, 2008
By
Use anchoring to lose years off your age

It is well known in psychology that the way a question is asked can strongly influence the answer. For example, if you spin a random number wheel and later have people guess the proportion of United Nations countries that are African, their answers clo...

Read more »

Setting up Textmate to use R

November 21, 2008
By
Setting up Textmate to use R

After becoming frustrated using the StatET plugin for Eclipse on my Mac (sometimes the R console would start and sometimes not), I decided to use Textmate instead. Textmate allows you to install extra bundles which are plug-ins to add some new function...

Read more »

Plot symbols in R

November 18, 2008
By

In the plot environment, the "pch" parameter decides the symbol of your output. There are about 130 symbols hard coded and passed into "pch."However, there are still some symbols that are not in these 130 pch's. For instance, there is no checkmark. To plot checkmark or other symbols, we can...

Read more »

Plot symbols in R

November 18, 2008
By

In the plot environment, the "pch" parameter decides the symbol of your output. There are about 130 symbols hard coded and passed into "pch."However, there are still some symbols that are not in these 130 pch's. For instance, there is no checkmark. To plot checkmark or other symbols, we can...

Read more »

Call C from R and R from C

November 17, 2008
By
Call C from R and R from C

Several years ago, while a research associate at the University of Chicago, I had the privilege of sitting in on a course taught by Peter Rossi: Bayesian Applications in Marketing and MicroEconometrics. This course -- one I recommend to anyone at U Ch...

Read more »

Multivariate dependence with copulas

November 17, 2008
By
Multivariate dependence with copulas

Classes (S4) of commonly used copulas including elliptical (normal and t), Archimedean (Clayton, Gumbel, Frank, and Ali-Mikhail-Haq), extreme value (Husler-Reiss and Galambos), and other families (Plackett and Farlie-Gumbel-Morgenstern). Methods for density, distribution, random number generation, bivariate dependence measures, perspective and contour plots....

Read more »

Sweave Engine for TeXShop

November 17, 2008
By

Sweave is an awesome utility for including the output of R code in a LaTeX document which I have started using regularly. TeXShop is my favorite editor/viewer for LaTeX under Mac OS X for many reasons. One of which is the speed of the edit -> compile -...

Read more »

Sponsors