## A new blog about using R for ecology and evolution

December 27, 2010
By

I am starting this blog not because I am a seasoned code writer, but because I am learning how to use R specifically for ecology and evolution, and figured many others might have the same questions I have. If I find cool solutions I will post them here...

## The tightrope of the random walk

December 27, 2010
By

We’re really interested in markets, but we’ll start with a series of coin tosses.  If the coin lands heads, then we go up one; if it lands tails, we go down one. Figure 1: A coin toss path.Figure 1 is the result of one thousand coin flips.  It is a random walk. The R command … Continue reading...

## R/Finance 2011 Call for Papers

December 26, 2010
By

The 2011 R/Finance conference has an updated call for papers.  Dirk Eddelbuettel announced it to the R-SIG-Finance mailing list.  I've reproduced his email in its entirety below.  Let me know if you plan on attending.Subject: R/Finance 2...

## R/Finance 2011 Call for Papers

December 26, 2010
By

The 2011 R/Finance conference has an updated call for papers.  Dirk Eddelbuettel announced it to the R-SIG-Finance mailing list.  I've reproduced his email in its entirety below.  Let me know if you plan on attending.Subject: R/Finance 2...

## Graphics *and* Statistics: The Facebook Map

December 26, 2010
By

There is this beautiful graph created by the facebook intern Paul Butler showing all (?) connections between facebook accounts: Paul’s article is called “Visualizing Friendships“, which I would more call “Visualizing connections between facebook accounts”, but that is probably a different matter. Although this is a beautiful piece of artwork, from a statistical point of

## Age and happiness: The pattern isn’t as clear as you might think

December 26, 2010
By

A couple people pointed me to this recent news article which discusses "why, beyond middle age, people get happier as they get older." Here's the story: When people start out on adult life, they are, on average, pretty cheerful. Things... ...

## Autocorrelation Matrix in R

December 25, 2010
By

I have been simulating a lot of data lately  with various covariance (correlation) structures, and one that I have been using is the autocorrelation (or autoregressive) structure, where there is a “lag” between variables. The matrix is a v-dimension matrix of the form \begin{bmatrix} 1 & \rho & \rho^2 & \dots & \rho^{v-1}\\ \rho &

## Has the seed that gets software development out of the stone-age been sown?

December 25, 2010
By

A big puzzle for archaeologists is why stone age culture lasted as long as it did (from approximately 2.5 millions years ago until the start of the copper age around 6.3 thousand years ago). Given the range of innovation rates seen in various cultures through-out human history a much shorter stone age is to be

## Rcpp 0.9.0 announcement

December 25, 2010
By

The text below went out as a post to the r-packages list a few days ago, but I thought it would make sense to post it on the blog too. So with a little html markup... Summary Version 0.9.0 of the Rcpp package is now on CRAN and its mirrors. Thi...

## one-dimensional integrals

December 25, 2010
By
$one-dimensional integrals$

The foundamental idea of numerical integration is to estimate the area of the region in the xy-plane bounded by the graph of function f(x). The integral was esimated by divide x to small intervals, then add all the small approximations to give a total approximation. Read More: 468 Words Totally

## one-dimensional integrals

December 25, 2010
By
$one-dimensional integrals$

The foundamental idea of numerical integration is to estimate the area of the region in the xy-plane bounded by the graph of function f(x). The integral was esimated by divide x to small intervals, then add all the small approximations to give a total approximation. Read More: 468 Words Totally

## Chromosome bias in R, my notebook

December 23, 2010
By

My goal is to develop a means of detecting chromosome bias from a human BAM file.Because I've been working with proprietary and novel plant genomes for the last three years, I haven't had the chance to use any of the awesome UCSC-based annotational features that have been introduced and refined in Bioconductor until now. I've returned to biomedical research...

## Chromosome bias in R, my notebook

December 23, 2010
By

My goal is to develop a means of detecting chromosome bias from a human BAM file.Because I've been working with proprietary and novel plant genomes for the last three years, I haven't had the chance to use any of the awesome UCSC-based annotational features that have been introduced and refined in Bioconductor until now. I've returned to biomedical research...

## Did you feel that?

December 23, 2010
By

There was a small earthquake in northern England on Tuesday. Barry Rowlingson felt the quake (it rattled the photographs on his wall), but didn't know how big of a quake it was because he didn't know how close he was to the epicentre. The British Geological Survey hadn't yet announced the quake, but did give access to seismograph readings,...

## Citizen Data Journalism: Mexico Homicides

December 23, 2010
By

I've recently praised some mainstream media outlets like the New York Times and New Scientist for leading the charge on data journalism. But you don't need to be a large organization to find news in data. With open data sources, and open-source data analysis tools, individuals can make newsworthy discoveries. Diego Valle-Jones has been investigating the impact of the...

## R function to convert degrees to radians

December 23, 2010
By

I would have never imagined that I would have to go back to high school concepts and do strange trigonometric calculations. However, it happened to me that I needed to convert GPS coordinates of a large data set to radians. It’s a trivial task, if you know how to do it. The function takes as

## Project Euler — Problem 187

December 23, 2010
By

http://projecteuler.net/index.php?section=problems&id=187 A composite is a number containing at least two prime factors. For example, 15 = 3 × 5; 9 = 3 × 3; 12 = 2 × 2 × 3. There are ten composites below thirty containing precisely two, not necessarily distinct, prime factors: 4, 6, 9, 10, 14, 15, 21, 22, 25, 26. Read...

## Project Euler — Problem 187

December 23, 2010
By

http://projecteuler.net/index.php?section=problems&id=187 A composite is a number containing at least two prime factors. For example, 15 = 3 × 5; 9 = 3 × 3; 12 = 2 × 2 × 3. There are ten composites below thirty containing precisely two, not necessarily distinct, prime factors: 4, 6, 9, 10, 14, 15, 21, 22, 25, 26. Read...

## Some problems with the Mexican mortality database

December 22, 2010
By

I've written before about how I couldn't find the Acteal Massacre in the homicide database available at the INEGI. So I decided to check if the deaths that occurred as a consequence of the massacre were misclassified as other types of violent death, and indeed they were. In the municipality of Chenalhó,...

## Some problems with the Mexican mortality database

December 22, 2010
By

I've written before about how I couldn't find the Acteal Massacre in the homicide database available at the INEGI. So I decided to check if the deaths that occurred as a consequence of the massacre were misclassified as other types of violent death, and indeed they were. In the municipality of Chenalhó,...

## A plea for consistent style!

December 22, 2010
By

As we get close to the end of the year, it's time to look back over the past year and think of resolutions for 2011 and beyond. One that's often on my mind relates to ways to structure my code to make it clearer to others (as well as to myself when I l...

## Forbes: R is a name you need to know in 2011

December 22, 2010
By

The December 20 issue of Forbes magazine, on newsstands now, includes a column about R on page 128 as part of the "Name You Need to Know in 2011" feature. It's basically an excerpt from this blog post by Steve McNally and its comments, and includes quotes from Norman Nie of Revolution Analytics, Bill Alpert of Barron's, and Brandon...

## A Special Graphics Device in R: the Null Device

December 22, 2010
By

It is well-known that R has several graphics devices — either the screen devices (X11(), windows(), …) or the off-screen devices (pdf(), png(), …). We can query the default graphics device in options(): getOption('device') In a non-interactive session, the default device is pdf(). This is why Sweave has to create a file named Rplots.pdf no

## Oil – Natural Gas Cointegration – turning point?

December 22, 2010
By

## Data-driven arterial input functions

December 22, 2010
By

I haven't devoted any time/effort/code to the extraction and parameter estimation of arterial input functions (AIFs) for DCE-MRI in either the vignette or the submission to JSS.  Frankly, I wanted to communicate the main features of the R package dcemriS4 and data-driven AIFs just haven't made the list... up 'til now.  So let's assume one wants to fit...

## Data-driven arterial input functions

December 22, 2010
By

I haven't devoted any time/effort/code to the extraction and parameter estimation of arterial input functions (AIFs) for DCE-MRI in either the vignette or the submission to JSS.  Frankly, I wanted to communicate the main features of the R package dcemriS4 and data-driven AIFs just haven't made the list... up 'til now.  So let's assume one wants to fit...

## Stacked histogram with ggplot2

December 22, 2010
By

With ggplot2 there is a possibility to create divide bars of a histogram into different categories:

## RcppExamples 0.1.2

December 22, 2010
By

A new version of our RcppExamples, package is now on CRAN. RcppExamples contains a few illustrations of how to use Rcpp. It grew out of documentation for the classic API (now in its own package RcppClassic) and we added more functions documenting...