Example 9.18: Constructing the fastest relay team via enumeration

January 5, 2012
By
Example 9.18: Constructing the fastest relay team via enumeration

In competitive swimming, the medley relay is a team event in which four different swimmers each swim one of the four strokes: freestyle, breaststroke, backstroke, and butterfly. In general, every swimmer might be able swim any given stroke. How can w...

Read more »

Revisiting basic macroeconomics : Illustrations with R

January 5, 2012
By
Revisiting basic macroeconomics : Illustrations with R

PrologueAfter 3 semesters of studying economics at IGIDR, the basics of macroeconomics still elude me. What policy shifts what curve? What determines the slope of IS-LM and AD-AS curves? What exactly was Keynes contribution to Economics? How do all the...

Read more »

Survey: Writing package vignette

January 5, 2012
By
Survey: Writing package vignette

I am currently co-writing the vignette for the ChainLadder package and wonder what I should be focusing on. I have co-written the vignette of the googleVis package in the past and based it purely and what I thought would work. So, this is an experiment...

Read more »

Good at applying R? Be a Sales Engineer!

January 5, 2012
By

Revolution Analytics is hiring! We're looking for a Sales Engineer -- someone who can show Revolution R to potential customers and really show off what R can do in an applied setting. (Fun fact: this was my first job when I left university, and it's a lot of fun.) The job description is below, please pass it along to...

Read more »

Working with data frames

January 5, 2012
By

R, just like other programming languages, has different types of objects. Matrices, arrays, data.frames, lists, vectors, tables, etc. But by far the most important for working with baseball data is going to be dataframes.I'm not sure of the level of ex...

Read more »

New Year’s Resolution: Learn How to Code

January 5, 2012
By

Farhad Manjoo at Slate has a good article on why you need to learn how to program. Chances are, if you're reading this post here you're already fairly adept at some form of programming. But if you're not, you should give it some serious thought.Gina Trapani, former editor of tech blog Lifehacker, is quoted in the article:“Learning...

Read more »

Presidents in Twitter

January 5, 2012
By
Presidents in Twitter

I saw the release of a new version of twitteR package a few weeks back and thought I should be testing the code I wrote some time ago but also do something interesting at the same time. Thus I came up with the idea of checking out how Presidents are do...

Read more »

The top 7 portfolio optimization problems

January 5, 2012
By
The top 7 portfolio optimization problems

Stumbling blocks on the trek from theory to practical optimization in fund management. Problem 1: portfolio optimization is too hard If you are using a spreadsheet, then this is indeed a problem. Spreadsheets are dangerous when given a complex task.  Portfolio optimization qualifies as complex in this context (complex in data requirements). If you are … Continue reading...

Read more »

MLB Year by Year Total Annual Payroll

January 4, 2012
By
MLB Year by Year Total Annual Payroll

Description:Year by year total annual payroll for Major League Baseball.Data: http://www.nsf.gov/about/congress/112/highlights/cu11_0523.jsphttp://www.baseball-databank.org/Analysis:The entire yearly budget for the National Science Foundation is c...

Read more »

Revolution Analytics named Startup to Watch in 2012

January 4, 2012
By

While we were out over the holiday break, Silicon Angle selected five open-source startups that are commercializing and contributing to open source projects as "Startups to Watch in 2012". Revolution Analytics was #2 on the list: This was a busy year for Revolution. The company released Revolution R 5.0, which included Hadoop integration, allowing users to create map/reduce jobs...

Read more »

Scraping R-Bloggers with Python

January 4, 2012
By

In this post I promised to show how I use Python with the BeautifulSoup and Mechanize modules to scrape information from different websites. As a fun exercise, and something that should interest the readers of R-bloggers, I thought it would be interest...

Read more »

A Quick Demo of SoilProfileCollection Methods and Plotting Functions

January 4, 2012
By
A Quick Demo of SoilProfileCollection Methods and Plotting Functions

Here is a quick demo of some of the new functionality in AQP as of version 0.99-9.2. The demos below are based on soil profiles from an archive described in (Carre and Girard, 2002) available on the OSACA page. A condensed version of the collection is ...

Read more »

Iowa: Was the fix in? (a statistical analysis of the results)

January 4, 2012
By
Iowa: Was the fix in? (a statistical analysis of the results)

Summary/TL;DR Either the first precincts to report were widely unrepresentative of Iowa as a whole, or something screwy happened. Background Yesterday was the first primary for the 2012 U.S. presidential elections. When I logged off the internet last night, the results in Iowa showed a dead heat between Ron Paul, Mitt Romney, and Rick Santorum.

Read more »

Mapping the Iowa GOP 2012 Caucus Results

January 4, 2012
By
Mapping the Iowa GOP 2012 Caucus Results

Introduction On Tuesday January 3rd 2012 the Iowa Republican party held it’s presidential caucuses, with Mitt Romney beating Rick Santorum by 8 votes as of noon on Jan 4th. This was an exciting race with multiple lead changes and entrance polling showing many late undecideds and large gaps in candidate support by age and income.

Read more »

Long running R commands: unix screen, nohup and R

January 4, 2012
By

I wanted to write a quick post about a useful linux tool for using R. I sometimes have long running R sessions for model training. One solution that I have alluded to is to call your script with Rscript. The nohup command in linux with push this to the...

Read more »

New York Journalism Data Camp in February

January 4, 2012
By

New York Journalism Data Camp in February: ScraperWiki’s first US two dayJournalism Data Camp event in conjunction with the Tow Center for Digital Journalism at Columbia University and supported by the Knight Foundation on February 3rd and 4th 2012.

Read more »

Memoization in R : Illustrative example

January 4, 2012
By

I came across a nice problem at project euler that gave me sense of satisfaction that was unusual, I think that because I don't usually get the solutions right the first time as I did in this case. Anyhow, I shall try and decode the R codes that I...

Read more »

Example 7.17 in Introduction to Monte Carlo methods with R

January 4, 2012
By
Example 7.17 in Introduction to Monte Carlo methods with R

I received the following email about Introducing Monte Carlo Methods with R a few days ago: Hallo Dr. Robert, I  am studying your fine book for myself. There´s a little problem in examples 7.17 and 8.1: in the R code a function “gu” is used and a reference given to ex. 5.17, but I cann´t

Read more »

Doing Bayesian Data Analysis now in JAGS

January 3, 2012
By

Around Christmas time I presented my first impressions of Kruschke’s Doing Bayesian Data Analysis. This is a very nice book but one of its drawbacks was that part of the code used BUGS, which left mac users like me stuck. … Continue reading →

Read more »

Plotting Doctor Who Ratings (1963-2011) with R

January 3, 2012
By
Plotting Doctor Who Ratings (1963-2011) with R

Introduction First day back to work after New Year celebrations and my brain doesn’t really want to think too much. So I went out for lunch and had a nice walk in the park. Still had 15 minutes to kill before my lunch break was over and so decided to kill some time with a quick web

Read more »

useR! 2012 Simple Abstract Helper

January 3, 2012
By
useR! 2012 Simple Abstract Helper

useR! 2012 has issued a call for abstracts! I've extended the WebSweave concept to offer a tool to create simple abstracts online, including those with markup, which may then be submitted at the conference website. Use the following link for the Simple Abstract Helper.

Read more »

Extract different characters between two strings of equal length

January 3, 2012
By
Extract different characters between two strings of equal length

In the desperate effort of understanding the secret of life it may be too simplistic to just count the differences between two strings of equal length. You might as well want to know where they differ. You can do that recycling most of the function published in a previous post. You can use it to

Read more »

Coefplot: New Package for Plotting Model Coefficients

January 3, 2012
By
Coefplot: New Package for Plotting Model Coefficients

By Joseph Rickert Even to the practiced eye, looking at coefficients in R model summaries can be tedious. And, capturing information about the significance of coefficients from scores or maybe even hundreds of models in a way that makes writing the final report a bit easier is a time consuming and thankless task. Of course, once you know what...

Read more »

Parallel R (Linux User & Developer Issue 108)

January 3, 2012
By
Parallel R (Linux User & Developer Issue 108)

In the 108. issue of Linux User & Developer was an article “Supercharge your R experience” about using parallel techniques to analyse large amounts of data with R. 4 page step-by-step tutorial shows the basics needed for installing needed packages … Continue reading →

Read more »

Baltimore gun offenders and where academics don’t live

January 3, 2012
By
Baltimore gun offenders and where academics don’t live

Jeff recently posted links to data from cities and states. He and I wrote R code that plots gun offender locations for Baltimore. Specifically we plot the locations that appear on this table. I added locations of the Baltimore neighborhoods where most ...

Read more »

2012, Turing year

January 3, 2012
By
2012, Turing year

Buying the special issue of La Recherche on “La révolution des mathématiques”, I discovered that this is the Alan Turing Year in celebration of the 100th anniversary of Turing‘s birth. The math department at the University of Leeds has a webpage on all the events connected with this celebration. From all over the World. (There

Read more »

Were markets exceptionally volatile in 2011?

January 2, 2012
By
Were markets exceptionally volatile in 2011?

2011 was a volatile year, no doubt about that, but was it exceptionally so from a historic point of view? To quantify the volatility, I used the Dow Jones Industrial average, which goes back to 1928 on Yahoo Finance: A volatile year no doubt, but once again confirming the fact that, in markets behaviour at

Read more »

Lesson 1: Overview of R Language & CloudStat School

January 2, 2012
By
Lesson 1: Overview of R Language & CloudStat School

This is the first lesson of CloudStat School, Lesson 1: Overview of R Language & CloudStat School. The objective of this lesson is introducing R Language and how you can be a R programmer or a data analyst through CloudStat School. At the end of this l...

Read more »

Voting Networks in the Danish Parliament

January 2, 2012
By
Voting Networks in the Danish Parliament

One of my Christmas presents was the book Beautiful Visualization. Chapter 8 by Andrew Odewahn is a very nice piece on visualizing the U.S Senate social graph. Odewahn basically builds an affinity network, where ties represent whether two senator have ...

Read more »