US State Maps using map_data()

December 11, 2012
By
US State Maps using map_data()

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...

Read more »

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>"

Read more »

Comparing regions: maps, cartograms and tree maps

December 11, 2012
By
Comparing regions: maps, cartograms and tree maps

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, ...

Read more »

New website!

December 11, 2012
By

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

Read more »

Loading all installed R packages

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...

Read more »

XLLoop examples

December 10, 2012
By
XLLoop examples

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

Read more »

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

December 10, 2012
By
Microsoft Research NYC seeks quants and programmers for a postdoc in online social science

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.

Read more »

d3 Showreel Combined with R and Shiny

December 10, 2012
By
d3 Showreel Combined with R and Shiny

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...

Read more »

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...

Read more »

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...

Read more »

garch and the Algorithmic Trading Conference

December 10, 2012
By
garch and the Algorithmic Trading Conference

The Imperial College Algorithmic Trading Conference was Saturday. Talks Massoud Mussavian Massoud gave a great talk on “Algo Evolution”.  It started with a historical review of how trading used to be done “by hand”.  It culminated in a phylogenetic tree of trading algorithms.  There was an herbivore branch and a carnivore branch. Robert Macrae Robert … Continue reading...

Read more »

Example 10.8: The upper 95% CI is 3.69

December 10, 2012
By
Example 10.8: The upper 95% CI is 3.69

Apologies for the long and unannounced break-- the longest since we started blogging, three and a half years ago. I was writing a 2-day course for SAS users to learn R. Contact me if you're interested. And Nick and I are beginning work on the second...

Read more »

Special Issue of ACM TOMACS on Monte Carlo Methods in Statistics

December 10, 2012
By
Special Issue of ACM TOMACS on Monte Carlo Methods in Statistics

As posted here a long, long while ago, following a suggestion from the editor (and North America Cycling Champion!) Pierre Lécuyer (Université de Montréal), Arnaud Doucet (University of Oxford) and myself acted as guest editors for a special issue of ACM TOMACS on Monte Carlo Methods in Statistics. (Coincidentally, I am attending a board meeting

Read more »

Visualizing Baltimore 3: Crime and Vacant Properties, Neighborhood Level

December 10, 2012
By
Visualizing Baltimore 3: Crime and Vacant Properties, Neighborhood Level

A few quick plots of West Baltimore neighborhoods, first Sandtown-Winchester: and Harlem Park: These aren’t very polished, I’ll put up better versions. Here’s the code for those that want it: ## gis libraries library(spBayes) library(MBA) library(geoR) library(fields) library(sp) library(maptools) library(rgdal)...

Read more »

analyze the american community survey (acs) with r and monetdb

December 10, 2012
By

experimental.  think of the american community survey (acs) as the united states' census for off-years - the ones that don't end in zero.  every year, one percent of all americans respond, making it the largest complex sample administered by ...

Read more »

Visualizing Baltimore 2: Vacant Property and Some More Crime

December 10, 2012
By
Visualizing Baltimore 2: Vacant Property and Some More Crime

One of the key predictors in my model for this crime project I’m working on is vacant houses and lots. I’ll speak to some findings about the relationship between levels of the different types of crime and vacant property in...

Read more »

"Economics-style" graphs with bezier() from Hmisc

December 10, 2012
By
"Economics-style" graphs with bezier() from Hmisc

So, I really think this one is pretty cool. We spend much of our time in R making graphs with data, but what if you have a theory that you’d like to express graphically? Something like what I’ll call “economics-style” graphs, i...

Read more »

Shiny apps are awesome

December 10, 2012
By
Shiny apps are awesome

RStudio has a new product called Shiny that, quoting from their website, "makes it super simple for R users like you to turn analyses into interactive web applications that anyone can use". See here for more information. A Shiny basically consists of two files: a ui.r file and a server.r file. The ui.r file, as it says, provides...

Read more »

Shiny apps are awesome

December 10, 2012
By
Shiny apps are awesome

RStudio has a new product called Shiny that, quoting from their website, "makes it super simple for R users like you to turn analyses into interactive web applications that anyone can use". See here for more information. A Shiny basically consists of two files: a ui.r file and a server.r file. The ui.r file, as it says, provides...

Read more »

ICERM Reproducibility Workshop: Day 1

December 10, 2012
By

I'm attending a workshop on reproducibility at ICERM (Brown University) this week. I really appreciate this great opportunity offered by ICERM, Randy and Victoria. It is pretty exciting to meet people that you only knew before through indirect ways. O...

Read more »

Using (R) Markdown, Jekyll, & GitHub for a Website

December 10, 2012
By

Introduction Markdown has been growing in popularity for writing documents on the web. With the introduction of R Markdown (see also Jeromy Anglim’s post on getting started with R Markdown) and knitr, R Markdown has simplified the publishing of R analysis on the web. I recently converted my website from Wordpress to Jekyll. Jekyll...

Read more »

A Simple Model for Realized Volatility

December 9, 2012
By
A Simple Model for Realized Volatility

The post has two goals: (1) Explain how to forecast volatility using a simple Heterogeneous Auto-Regressive (HAR) model. (Corsi, 2002) (2) Check if higher moments like Skewness and Kurtosis add forecast value to this model. It will be a high … Continue reading →

Read more »

Handling missing data with Amelia

December 9, 2012
By
Handling missing data with Amelia

So, what if you have data, but some of the observations are missing? Many statistical techniques assume no missingness, so we might want to “fill in” or rectangularize our data, by replacing missing observations with plausible substitutes....

Read more »

How to explore your heartbeat

December 8, 2012
By

A few months ago, I bought a really cool book: Exploring Everyday Things (with R and Ruby). I learned many interesting and mostly useless things from the author, Sau Sheong Chang. Chapter 6 for example explains how to build a … Weiterlesen →

Read more »

Rcpp attributes: Even easier integration of GSL code into R

December 8, 2012
By
Rcpp attributes: Even easier integration of GSL code into R

Following the Rcpp 0.10.0 release, I had written about simulating pi easily by using the wonderful new Rcpp Attributes feature. Now with Rcpp 0.10.1 released a good week ago, it is time to look at how Rcpp Attributes can help with external libraries. As this posts aims to show, it is a breeze! One key aspect is the use of...

Read more »

Evaluating term popularity with twitteR

December 8, 2012
By
Evaluating term popularity with twitteR

I really wanted to put something together for this series on the twitteR package. Unfortunately, at the moment the number of interesting things than can be done with twitteR, as opposed to through API calls and RCurl, is limited. Regardless, I have Ye...

Read more »

Bridge hand distribution: simulation vs exact calculation

December 8, 2012
By
Bridge hand distribution: simulation vs exact calculation

Recently I played bridge with my friends. Being frustrated with several consecutive poor hand distributions we asked ourselves a question what is the probability of having a hand good enough for a small slam. A well known rule of thumb is that you need...

Read more »

Fifty Shades of Grey in R

December 8, 2012
By
Fifty Shades of Grey in R

My wife went out to her book group tonight and their book of the month was 50 Shades of Grey. Sadly, I could think of is that plotting 50 shades in R would be a neat exercise. require(ggplot2) grey50 <- data.frame( x = rep(1:10, 5), y = rep(1:5, ...

Read more »

XLLoop framework

December 7, 2012
By
XLLoop framework

Today I want to highlight the XLLoop framework : Excel User-Define Functions in in any language. The XLLoop consists of two main components: An Excel addin implementation (XLL written in c++). A server and framework written in R (or/and in many other languages). The XLLoop allows you to connect Excel and R in very simple

Read more »

Sponsors

Mango solutions



RStudio homepage



Zero Inflated Models and Generalized Linear Mixed Models with R

Dommino data lab

Quantide: statistical consulting and training



http://www.eoda.de





ODSC

ODSC

CRC R books series





Six Sigma Online Training





Contact us if you wish to help support R-bloggers, and place your banner here.