## ISO week

October 22, 2009
By

I am working with a model that produces estimates of snow water equivalent through time. Because I deal with large spatial extents, I decided to have the model produce weekly averages. The problem with this is knowing which file to access for a given d...

## Leap years

October 22, 2009
By

A quick function that when provided a numeric vector of years returns a boolean vector where TRUE == Leap year.is.leapyear=function(year){ #http://en.wikipedia.org/wiki/Leap_year return(((year %% 4 == 0) & (year %% 100 != 0)) | (year %% 400 == 0))}

## Leap years

October 22, 2009
By

A quick function that when provided a numeric vector of years returns a boolean vector where TRUE == Leap year.is.leapyear=function(year){ #http://en.wikipedia.org/wiki/Leap_year return(((year %% 4 == 0) & (year %% 100 != 0)) | (year %% 400 == 0))}

## Aggreate electoral targeting with R

October 22, 2009
By

Aggregate electoral targeting is the process of determining the likely hood of a citizen choosing to vote turnout), and which candidate that person is most likely to vote for (partisan bias) in a given race using historical turnout and partisan bias. The output from this targeting allows a campaign to project the likely number of voters, what percentages their...

## ggplot2: Two Color XY-Area Combo Chart

October 21, 2009
By

David@Work blog shows how to fill in the area between two crossing lines in an Excel chart. This post was also published as a guest-post on PTS blog. Let’s try to replicate this graph in ggplot2. First, load ggplot2 and generate the data frame to be used in the example (I am using a slightly

## InferenceR looks interesting

October 21, 2009
By

I obtained a free academic copy of the InferenceR, which is a R IDE for Windows. I has several interesting features such as a visual debugger. It is definitely worth some further exploration. Of course, the problem (and the only problem for now) is tha...

## Dianne Reeves: Strings Attached at the CSO

October 16, 2009
By

Another trio concert at CSO, but very different from the most recent classic piano trio. Tonight was once again a chance to see Dianne Reeves (wikipedia) but this time accompanied simply by two guitarists: Russell Malone and Romero Lubambo (wikipedia). Given that Dianne Reeves (who we had seen in just a few month earlier in our neighbourgood) has plenty of stage...

## Software for Surviving Graduate School Part 1

October 16, 2009
By

After introducing a colleague to the wonders of Dropbox today (more on that later) I realized that it might be useful to put out a list of software that is of use to graduate students. I often find that many of the software products I find indispensable are virtually unknown to many of my fellow graduate students. Certainly this...

## Use R 2009 Conference

October 16, 2009
By

I did not attend the conference this year, but just read through the presentations. There is some overlap with other R-related conferences, such as R in Finance or the Rmetrics workshop. http://www.agrocampus-ouest.fr/math/useR-2009/ http://www.rinfina...

## The optimal way to do sweave

October 16, 2009
By

The optimal way to do sweave may be to have a master file in LaTeX, and a separate Rnw file contains all the computations, figures, and tables. That way, it is easy to compile the LaTeX as the writing goes on without the hassle of carrying out the comp...

## Filled contour with log-log scale

October 15, 2009
By

A quick workaround to have a filled.contour plot with natural log10-log10 scale (instead of the default natural log scale) plotmat <- function(mat,main='',factor='M',MeasuredResponse='Coexistence') { X <- as.numeric(rownames(mat)) Y <- as.numeric(colnames(mat)) if(factor=='C') { Y <- Y/0.16 } rownames(mat) <- as.numeric(X) colnames(mat) <- as.numeric(Y) colorFun <- colorRampPalette(c("black","darkblue","blue","green", "orange",'yellow',"red","darkred",'white')) lX <- log(X, 10) lY <- log(Y, 10) pretty.X.at <-

## Comprehensive Change Detection Suite: Free & Available

October 15, 2009
By

October 2009 Open Data Group has launched a changed detection project on Google Code, http://code.google.com/p/change-detection/. This is an introduction and demonstration of using open source software and the Data Mining Group’s Predictive Model Markup Language (PMML) standard to perform data analytics.  Specifically, we show how using multiple Baseline models over segments can be used to detect of

## “I’m a Republican because…”, visualized with R

October 15, 2009
By

Visualizing user-generated statements from GOP.com to the theme of "I'm a Republican because...", using R.

## R Tutorial Series: Introduction to The R Project for Statistical Computing (Part 2)

October 15, 2009
By

Welcome to part two of the Introduction to The R Project for Statistical Computing tutorial. If you missed part one, it can be found here. In this segment, we will explore the following topics.Importing DataVariablesWorkspace FilesConsole FilesFinding ...

## The Elements of Statistical Learning

October 14, 2009
By

The Elements of Statistical Learning written by Trevor Hastie, Robert Tibshirani and Jerome Friedman is A-MUST-TO-READ for everyone involved in the data mining field! Now you can legally download a copy of the book in pdf format from the authors websit...