## CRAN Search

June 30, 2010
By

Here's a ditty to search the cran R packages by descriptioncranSearch = function(q=''){  library(XML)  u<-'http://cran.r-project.org/web/packages/'  d<-readHTMLTable(u)  d]\$V1  lib.names <-...

June 30, 2010
By

This week I had the opportunity the trek up north to Silicon Valley to attend Yahoo’s Hadoop Summit 2010. I love Silicon Valley. The few times I’ve been there the weather was perfect (often warmer than LA), little to no traffic, no road rage and people overall seem friendly and happy. Not to mention there are so many trees...

## Drawing pedigree examples using the kinship R package

June 30, 2010
By

I have previously provided sort of an overview about plotting the pedigrees, then specifically using the Graphiviz, while I have lately used the TikZ LaTeX (see slides 11-15) system (see more example). The later gives great (beautiful) results, but at the cost of writing TikZ code - it is not that horible, just time consuming...

## Drawing pedigree examples using the kinship R package

June 30, 2010
By

I have previously provided sort of an overview about plotting the pedigrees, then specifically using the Graphiviz, while I have lately used the TikZ LaTeX (see slides 11-15) system (see more example). The later gives great (beautiful) results, but at the cost of writing TikZ code - it is not that horible, just time consuming...

June 30, 2010
By

About prize baring contests Competition with prizes are an amazing thing. If you are not sure of that, I urge you to listened to Peter Diamandis talk about his experience with the X prize (start listening at minute 11:40): At short – prizes can give up to 1 to 50 ratio of return on investment of the people giving...

## June 2010 edition of R Journal available

June 30, 2010
By

The latest edition of the R Journal is now available. This issue includes in-depth articles on the packages IsoGene, glmmBUGS, cshapes, tmvtnorm, neuralnet, glmperm and exactci/exact2x2, plus an example of reproducible research in R. There's also a review of the book A Beginner's Guide to R. The complete edition is available for download in PDF format at the link...

## Rmetrics slides

June 30, 2010
By

I presented Rcpp at the Rmetrics conference earlier today, this was a really good opportunity to look back at all the work Dirk and I have been commiting into Rcpp. I've uploaded my slides here (pdf) and on slideshare : Rcpp: Seemless R and C++V...

## R Journal 2/1

June 30, 2010
By

R Journal 2/1 is out! Grab it from here.

## R Journal 2/1

June 30, 2010
By

R Journal 2/1 is out! Grab it from here.

## Setting graph margins in R using the par() function and lots of cow milk

June 30, 2010
By

It is fairly straightforward to set the margins of a graph in R by calling the par() function with the mar (for margin!) argument. For example, par(mar=c(5.1,4.1,4.1,2.1) sets the bottom, left, top and right margins respectively of the plot region in number of lines of text. Another way is by specifying the margins in inches

## Rcpp 0.8.3

June 29, 2010
By

A new version 0.8.3 of Rcpp is now CRAN and in Debian. It comes about three weeks after the 0.8.2 release. And even though we promised to concentrate on documentation, it contains a raft of new features: The addition of what we dub Rcpp sugar: some ...

## Rcpp 0.8.3

June 29, 2010
By

A new version 0.8.3 of Rcpp is now CRAN and in Debian. It comes about three weeks after the 0.8.2 release. And even though we promised to concentrate on documentation, it contains a raft of new features: The addition of what we dub Rcpp su...

## Analyze Gold Demand and Investments using R

June 29, 2010
By

After the recent foray into stock analysis using quantmod, I thought it worthwhile to mention that the library can be used to analyze a wide variety of investments, including precious metals.  It is also worthwhile to mention that there are other ...

## Entropy augmentation the modulo way

June 29, 2010
By

Long before I had heard about the connection between entropy and probability theory, I knew about it from the physical sciences. This is most likely how you met it, too. You heard that entropy in the universe is always increasing, and, if you’re like me, that made very little sense. Then you may have heard

## Tips for managing memory in R

June 29, 2010
By

R is an in-memory application, so every new object you create takes up RAM. (Yes, there are ways around that, but that's a topic for another article.) If you're working on a small machine (say, a 32-bit Windows system with 1Gb of RAM or less) you might need to be careful with the object you create. This StackOverflow question...

## Sweave.sh in Eclipse-StatET

June 29, 2010
By

Sébastien Bihorel sent the following instructions on how to use my sweave.sh shell script in Eclipse-StatET.1- First, you need to know the path to your TEXINPUTS settings. Type R CMD env |grep TEXINPUTS in a shell. In my installation (opensuse 11.2), the shell returned the followingTEXINPUTS=.::/usr/lib/R/share/texmf:2- Edit your .bashrc file (located in your home directory) and add...

## Sweave.sh in Eclipse-StatET

June 29, 2010
By

Sébastien Bihorel sent the following instructions on how to use my sweave.sh shell script in Eclipse-StatET. 1- First, you need to know the path to your TEXINPUTS settings. Type R CMD env |grep TEXINPUTS in a shell. In my installation (opensuse 11.2), the shell returned the followingTEXINPUTS=.::/usr/lib/R/share/texmf:2- Edit your .bashrc file (located in your home directory) and add...

## Analyze Twitter Data Using R

June 28, 2010
By

Twitter data available through its API provides a wealth of real time information.  This article demonstrates a graph of user relationships and an analysis of tweets returned in a search using R.  Keep in mind, Twitter has announced that basi...

## Second year of entries!

June 28, 2010
By

Hello, readers new and old!We started adding examples a year ago, in advance of the book's publication. To mark the occasion, we're closing chapter 7 and starting chapter 8 next week. We've crafted a listing of all entries from the first year and mad...

## Bootstrapping the latest R into Amazon Elastic Map Reduce

June 28, 2010
By

I’ve been continuing to muck around with using R inside of Amazon Elastic Map reduce jobs. I’ve been working on abstracting the lapply() logic so that R will farm the pieces out to Amazon EMR. This is coming along really well, thanks in no small part to the Stack Overflow community. I have no

## How to peg 7 cores with doSMP

June 28, 2010
By

Statistics PhD student Nathan VanHoudnos has an 8-core laptop, and by his own admission, takes "an almost unhealthy pleasure in pushing computer to its limits". It seems like he's found an outlet for this passion with the new doSMP library included with Revolution R, that allows him to use all his processors for some gnarly simulations in R:...

## Comparing 2010 and 2007 Arctic Sea Ice Extent Trends

June 28, 2010
By

See my Arctic Update Page for daily updates on Arctic Sea Ice Extent In this post I present a chart that tracks the daily Arctic Sea ice Extent (SIE) for 2007 and 2010. I chose 2007 as the comparison year … Continue reading →

## Plot Multiple Time Series using the flow / inkblot / river / ribbon / volcano / hourglass / area / whatchamacallit plots ~ blue whale catch per country w/ ggplot2

June 27, 2010
By

Ever since I first looked at this NYT visualization by Amanda Cox, I’ve always wanted to reproduce this in R. This is a plot that stacks multiple time series onto one another, with the width of the river/ribbon/hourglass representing the strength at each time. The NYT article used box office revenue as the width of

## Another harmonic mean approximation

June 26, 2010
By
$Another harmonic mean approximation$

Martin Weinberg posted on arXiv a revision of his paper, Computing the Bayesian Factor from a Markov chain Monte Carlo Simulation of the Posterior Distribution, that is submitted to Bayesian Analysis. I have already mentioned this paper in a previous post, but I remain unconvinced of the appeal of the paper method, given that it

## Weekend art in R (Part 2)

June 26, 2010
By

I put together four of the best looking images generated by the code shown here: # More aRt par(bg="white") par(mar=c(0,0,0,0)) plot(c(0,1),c(0,1),col="white",pch=".",xlim=c(0,1),ylim=c(0,1)) iters = 500 for(i in 1:iters) { center = runif(2) size = 1/rbeta(2,1,3)   # Let's create random HTML-style colors color = sample(c(0:9,"A","B","C","D","E","F"),12,replace=T) fill = paste("#", paste(color[1:6],collapse=""),sep="") brdr = paste("#", paste(color[7:12],collapse=""),sep="")   points(center[1], center[2],

## Stock Analysis using R

June 26, 2010
By

Want to do some quick, in depth technical analysis of Apple stock price using R? Theres a package for that!The Quantmod package allows you to develop, testing, and deploy of statistically based trading models.  It provides the infrastructure for d...

## Read Compressed Zip Files in R

June 25, 2010
By

One of the great things that I am learning about R is that it is really powerful as a data management tool.  I just found how to unzip files.  I could use Python for this in SPSS, but it just feels like it is more natural to do in R.  Of course, you have to

## Because it’s Friday: Insect sex

June 25, 2010
By

Birds do it, bees do it. But the bees and their insect brethren definitely do it in a more interesting way. Don't believe me? Check out Isabella Rosselini's description of bee sex and the other videos in her educational "Green Porno" series. It's fascinating stuff. For some light summer reading, I also recommend Olivia Judson's "Dr. Tatiana's Sex Advice...