## In case you missed it: November 2012 Roundup

December 12, 2012
By

In case you missed them, here are some articles from November of particular interest to R users. In the webinar "Real-Time Predictive Analytics with Big Data", I showed how R fits into a real-time production system. R package developer Yihui Xie shares his favorite software and hardware in an interview with The Setup. Hadley Wickham created a handy tutorial...

## Survival of the sweetest

December 12, 2012
By

On receiving an advent calendar from one of our course directors, I suggested we could track each other’s chocolate consumption in a survival analysis and establish who was eating significantly more chocs. Strangely, everybody refused to take part, so I … Continue reading →

## How to plot a network (package network) – Tip 2

December 12, 2012
By

As you have certainly seen now, I like working on artificial neural networks. I have written a few posts about models with neural networks (Models to generate networks, Want to win to Guess Who and Study of spatial segregation).Unfortunately, I missed ...

## Using R to refine the search result of www.finn.no

December 12, 2012
By

www.finn.no is the most popular website in Norway. It supplies a lot of features, such as booking flight tickets, finding job, renting and sales of houses, cars and other properties, etc. I just have some experience with it. I sold and bought cars, apartment and some other stuff. It’s very convenient. But just one thing I feel not convenient:...

## Multidimensional metric unfolding with SMACOF

December 12, 2012
By

SMACOF stands for “Scaling by MAjorizing a COmplicated Function,” and it is a multidimensional scaling algorithm for metric unfolding of, among other things, rectangular ratings matrices. One neat Political Science application of MDS is i...

## Exporting Data From R to KDB

December 12, 2012
By

Here is the beginnings of a simple routine to convert R data frames to Q format (in this case a dictionary). It uses the S3 dispatch mechanism to handle the conversion of different data types. Extremely basic (I havent even … Continue reading →

## French R Conference in Lyon – call for contributions

December 12, 2012
By

La prochaine édition des Rencontres R aura lieu à Lyon en Juillet prochain. Ci-dessous, l’appel officiel à contributions. ————————————————– Appel à communication des 2èmes Rencontres R : Dans la lignée de la conférence internationale Use’R et suite à la première édition qui a eu lieu à Bordeaux

## project euler — problem 68

December 12, 2012
By

Consider the following "magic" 3-gon ring, filled with the numbers 1 to 6, and each line adding to nine. Working clockwise, and starting from the group of three with the numerically lowest external node (4,3,2 in this example), each solution can be described uniquely. For example, the above solution can be described by the...

## Comparing Quality of Life, Income Inequality, and Nobel Laureates per capita

December 11, 2012
By

Now that I’m done with finals, I finally have time to update my blog. I managed to find three separate Wikipedia entries: one about the Quality of Life Scores of several different countries, one about the number of Nobel Laureates per capita, and one that is a List of Countries by Income Inequality which uses

## Clarifying a Previous Item Response Theory Link

December 11, 2012
By

I wanted to thank those of you who have emailed and commented on my last post and its Link to Item Response Theory Presentations Using R.  In the Psychometrics Centre website, it is not until Topic 7 called Unidimensional IRT models for binar...

## Multidimensional scaling of REM album covers: FlagSpace revisited

December 11, 2012
By

By way of following up on an old in-joke, and doing something constructive because I couldn’t get to sleep, I thought I would revisit the Flag Space plot that I blogged about a while back and learn how to do it. … Continue reading →

## Videos from Coursera’s four week course in R

December 11, 2012
By

Coursera's Computing for Data Analysis course on R is now over, with four weeks of free, in-depth training on the R language. While you'll have to wait for the next installment of the course to participate in the full online learning experience, you can still view the lecture videos, courtesy of course presenter Roger Peng's YouTube page. The course...

## 2012-12 Post-Processing grid Graphics

December 11, 2012
By

Statistical plots drawn with the ggplot2 package generate numerous grid grobs and viewports which are labelled and organised into a coherent hierarchy. This report describes an example that shows how to manipulate the grobs and viewports in a ggplot2 plot … Continue reading →

## Music Network Visualization

December 11, 2012
By

Note: probably of interest only to the intersection of the readers who are into niche music genres and those interested in network visualization. My music interests have always been rather, hmm…, eclectic. Somehow IDM, ambient, darkwave, triphop, acid jazz, bossa … Continue reading →

## Estimating Pi

December 11, 2012
By

Recently I’ve been working on some jackknife and bootstrapping problems.  While working on those projects I figured it would be a fun distraction to take the process and estimate pi.  I’m sure this problem has been tackled countless times but I have never bothered to try it using a Monte Carlo approach.  Here is the

## Visualizing Baltimore 3.1: Crime and Vacant Properties, Neighborhood Level, Bit More Polished

December 11, 2012
By

Redos of the plots from this post: Bit more communicative, though the overplotting is a bit annoying. Code: ## gis libraries library(spBayes) library(MBA) library(geoR) library(fields) library(sp) library(maptools) library(rgdal) library(classInt) library(lattice) library(xtable) library(spatstat) library(splancs)   ## Other packages library(ggplot2) library(foreign) library(stringr)...

## Gmail went down. Nobody panic.

December 11, 2012
By

Source: 1500 random tweets from today with the terms 'gmail down' (pulled from API).

## Linear Models with Multiple Fixed Effects

December 11, 2012
By
$Linear Models with Multiple Fixed Effects$

Estimating a least squares linear regression model with fixed effects is a common task in applied econometrics, especially with panel data. For example, one might have a panel of countries and want to control for fixed country factors. In this case the researcher will effectively include this fixed identifier as a factor variable, and then proceed to

## R Tip: Avoid using T and F as synonyms for TRUE and FALSE

December 11, 2012
By

By default when you start R, T and F are defined as TRUE and FALSE. When I review other people’s code, I often see functions defined with arguments set to these values by default. This is a very bad idea. … Continue reading →

## US State Maps using map_data()

December 11, 2012
By

Today’s short post will show how to make a simple map using map_data(). Let’s assume you have data in a CSV file that may look like this: Notice the lower case state names; they will make merging the data much easier. The variable of inte...

## Split strings based on a character in the string

December 11, 2012
By

R has various facilities for string manipulation including the strsplit function to divide a string into substrings based on matching to another string. A simple example is shown below > strsplit("<td class=\"objectName\"><a href=\"/path/test.html\" target=\"\" title=\"An Object\" class=\"myObject\">Stuff</a></td>", "<") ] "" "td class=\"objectName\">" "a href=\"/path/test.html\" target=\"\" title=\"An Object\" class=\"myObject\">Stuff" "/a>" "/td>"

## Comparing regions: maps, cartograms and tree maps

December 11, 2012
By

Last week I attended a seminar where a talk was given about the economic opportunities in the SAAAME (South-America, Asia, Africa and Middle East) regions. Of course a map was shown with those regions highlighted. The map was not that disimilar to the one below. library(RColorBrewer)library(rworldmap)data(countryExData)par(mai=c(0,0,0.2,0),xaxs="i",yaxs="i")mapByRegion( countryExData, ...

## New website!

December 11, 2012
By

This is my new website! It’s built using jekyll-bootstrap and hosted on Github.

December 10, 2012
By

The other day I was trying to set up an R for Windows installation on a USB drive. As I don't have a Windows machine, I had to use the university computer to do this task. However, for some reason, they've blocked R from downloading and installing pack...

## XLLoop examples

December 10, 2012
By

Today I want to follow up with the XLLoop framework post. Please read the XLLoop framework post first to setup the XLLoop before trying the examples below. My first example is based on the TFX Package – to retrieve real-time FX quotes. To try this example, please first install the TFX Package. Please note that

## Microsoft Research NYC seeks quants and programmers for a postdoc in online social science

December 10, 2012
By

Microsoft Research NYC seeks outstanding applicants with strong quantitative and programming skills for a postdoctoral researcher position in the area of online experimental social science. Deadline for Full Consideration: January 11, 2013 The post Microsoft Research NYC seeks quants and programmers for a postdoc in online social science appeared first on Decision Science News.

## d3 Showreel Combined with R and Shiny

December 10, 2012
By

Since the d3 portion of the example provide in my last post d3 and r interacting through shiny was so weak, I thought it would be interesting to combine the much more compelling Showreel Example with the same stock data.  However, this time the da...

## Four years of the Revolutions Blog

December 10, 2012
By

Yesterday was the fourth anniversary of the Revolutions blog. Our first post was way back on December 9, 2008, and in the four years since we've been regularly posting about R, open source, statistics, big data, data science and other random things that happened to catch our eye. In fact, there have been 1488 posts published in the last...

## Community detection algorithm with igraph and R – (1)

December 10, 2012
By

In the first entry on this blog I gave an example on how to load huge graphs with R. The biggest problem, however, is actually doing something useful with huge graphs. This post is somewhat of a preparation for the next post on iterators in igraph. I t...