A Wrapper Function for Instant Package Installation / Loading

June 19, 2012
By

Since library() and require() only accept input with length(input) = 1 it is necessary to make repeated calls - this can be quite annoying.. So, HERE is a little wrapper function for convenient package installation / loading. It installs packages if th...

Read more »

Generate simple HTML slides using deck.js and markdown

June 19, 2012
By

RStudio and knitr are an excellent conbination for generating dynamic reports. But in this blog, I will show you how to generate HTML-style presentaion using R only. OK, I confess that we still need something else: deck.js and markdown and R.utils. ...

Read more »

Don’t recycle me!

June 19, 2012
By
Don’t recycle me!

For me, one of the most annoying features of R is that by default, rbind,  cbind  and data.frame recycle the shorter vector to the length of the longer vector. I still don’t understand why the standard generics don’t have a parameter like cbind(1:10, 1:5, fill = TRUE) to fill up with ‘NA’s. There may be

Read more »

Dynamical systems in R with simecol

June 18, 2012
By
Dynamical systems in R with simecol

This evening I will talk about Dynamical systems in R with simecol at the LondonR meeting. Thanks to the work by Thomas Petzoldt, Karsten Rinke, Karline Soetaert and R. Woodrow Setzer it is really straight forward to model and analyse dynamical systems...

Read more »

June 20: See the new features of Revolution R Enterprise 6

June 18, 2012
By

A quick heads-up that I'll be hosting a live webinar this Wednesday (June 20) with my colleage Sue Ranney on the new Revolution R Enterprise 6. If you've never taken a look at Revolution R Enterprise and want to know it's different from open-source R, or just want to learn about the new features, then please join us on...

Read more »

Overplotting solution for black-and-white graphics

June 18, 2012
By
Overplotting solution for black-and-white graphics

I'm working on producing some black and white graphics of data which has a lot of overplotting. There are three basic groups, which if I made the plot in ordinary full color ggplot2 would look like this (the code for the reverse-log x-axis is available...

Read more »

Date of death, birthday and Elvis Presley

June 18, 2012
By
Date of death, birthday and Elvis Presley

10 days ago, a study published on http://www.annalsofepidemiology.org/ mentioned that "Death has a preference for birthdays" (as claimed in the title). The conclusion of the paper is that, in general, birthdays do not evoke a postponement mechanism...

Read more »

[R-pkgs] igraph 0.6 released

June 18, 2012
By

Dear All, we have released version 0.6 of the igraph package today. This is a major new version, with a lot of new features, and (sadly) it is not completely compatible with code that was written for the previous igraph versions. (See “Major new features” below for details.) I have included below a list of (bigger) changes. Please see...

Read more »

Tracking US Sentiments Over Time In Wikileaks

June 18, 2012
By
Tracking US Sentiments Over Time In Wikileaks

Introduction I recently posted about using the Wikileaks cable corpus to find word use patterns, both over time, and in secret cables vs unclassified cables. I received a lot of good suggestions for further topics to pursue with the corpus, and probably the most interesting was the idea to do sentiment analysis over time on a variety of...

Read more »

Tracking US Sentiments Over Time In Wikileaks

June 18, 2012
By
Tracking US Sentiments Over Time In Wikileaks

Introduction I recently posted about using the Wikileaks cable corpus to find word use patterns, both over time, and in secret cables vs unclassified cables. I received a lot of good suggestions for further topics to pursue with the corpus, and probably the most interesting was the idea to do sentiment analysis over time on a variety of...

Read more »

Reproducible reports & research with knitr in R Studio

June 18, 2012
By
Reproducible reports & research with knitr in R Studio

Arguably, knitr (CRAN link) is the most outstanding R package of this year and its creator, Yihui Xie is the star of the useR! conference 2012. This is because the ease of use comparing to Sweave for making reproducible report. Integration of knitR and R Studio has made reproducible research much more convenience, intuitive and easier to

Read more »

Example 9.35: Discrete randomization and formatted output

June 18, 2012
By
Example 9.35: Discrete randomization and formatted output

A colleague asked for help with randomly choosing a kid within a family. This is for a trial in which families are recruited at well-child visits, but in each family only one of the children having a well-child visit that day can be in the study. The idea is that after recruiting the family, the research assistant...

Read more »

Tracking US Sentiments Over Time In Wikileaks

June 18, 2012
By
Tracking US Sentiments Over Time In Wikileaks

Introduction I recently posted about using the Wikileaks cable corpus to find word use patterns, both over time, and in secret cables vs unclassified cables. I received a lot of good suggestions for further topics to pursue with the corpus, and probably the most interesting was the idea to do sentiment analysis over time on a variety of named entities. Sentiment analysis is the process...

Read more »

R: Creating a shortcut to run a gWidgets GUI

June 18, 2012
By
R: Creating a shortcut to run a gWidgets GUI

I’ve been playing around with using gWidgets on Windows over the last few weeks as a way of creating front ends for various functions and set of functions that I’ve created, so that non R users can have the benefit of these without having to write a single line of code. The likes of 4Dpiecharts … Continue reading...

Read more »

Updates to package ‘intergraph’

June 18, 2012
By

On June 17 a new version (0.6) of package ”igraph” was released. This new version abandoned the old way of indexing graph vertices with consecutive numbers starting from 0. The new version now numbers the vertices starting from 1, which is more consistent with the general R convention of indexing vectors, matrices, etc. Because this change is

Read more »

Tracking US Sentiments Over Time In Wikileaks

June 18, 2012
By
Tracking US Sentiments Over Time In Wikileaks

Introduction I recently posted about using the Wikileaks cable corpus to find word use patterns, both over time, and in secret cables vs unclassified cables. I received a lot of good suggestions for further topics to pursue with the corpus, and probably the most interesting was the idea to do sentiment analysis over time on a variety of...

Read more »

Cross sectional spread of stock returns

June 18, 2012
By
Cross sectional spread of stock returns

A look at a simplistic measure of stock-picking opportunity. Motivation The interquartile range (the spread of the middle half of the data) has recently been added to the market portrait plots.  Putting those numbers into historical context was the original impulse. However, this led to thinking about change in stock-picking opportunity over time. Data Daily … Continue reading...

Read more »

Comparing performance in R, foreach/doSNOW, SAS, and NumPY (MKL)

June 17, 2012
By

This is a follow up to my previous post.  There is a quicker way to compute the function I created (basic cumulative sum) in R.Instead of:function f(x) {   sum = 0;   for (i in seq(1,x)) sum = sum + i   return(su...

Read more »

List of Free Online R Tutorials

June 17, 2012
By
List of Free Online R Tutorials

According to the post on FREE online R tutorials from universities, I have received many email suggesting more and more tutorials. However some tutorials are not hosted in an academic institutes, so I decided to create this post to list such tutorials. If you know other tutorials, please kindly suggest me by email to [email protected]

Read more »

Negros Quake Animation in R

June 17, 2012
By
Negros Quake Animation in R

Taken from a previous post in other website, maps below show the locations of epicenters and sequence of earthquakes that struck Negros last February 6, 2012. The bottom image is the animation these maps using animation package in R. Data was taken fr...

Read more »

Summary of community detection algorithms in igraph 0.6

June 17, 2012
By

  Based on Launchpad traffic and mailing list responses, Gabor and Tamas will soon be releasing igraph 0.6.  In celebration, I’ll be publishing a number of helpful lists and tables I’ve put together to organize information about igraph.   In…Read more ›

Read more »

An exercise in R using local open data

June 17, 2012
By
An exercise in R using local open data

Last week I went to the “Government Open Data Hack Day” (godhd on twitter) in Birmingham (UK), organised by Gavin Broughton and James Catell. The idea was to get hold of local open data and try and make use of … Continue reading →

Read more »

3D Maps in R

June 16, 2012
By
3D Maps in R

Talking about elevation, one can also plot a wire frame 3D view of an area using the persp function. Using the same data source from my previous post, 3D view of Marinduque, Philippines was produced using the following code below: ################...

Read more »

Why You Shouldn’t Conclude "No Effect" from Statistically Insignificant Slopes

June 16, 2012
By

It is quite common in political science for researchers to run statistical models, find that a coefficient for a variable is not statistically significant, and then claim that the variable "has no effect." This is equivalent to proposing a research &#8...

Read more »

integrating R with other systems

June 16, 2012
By

I just returned from the useR! 2012 conference for developers and users of R. One of the common themes to many of the presentations was integration of R-based statistical systems with other systems, be they other programming languages, web systems, or enterprise data systems. Some highlights for me were an update to Rserve that includes

Read more »

Euro2012 Viz: Second Group Games

June 16, 2012
By
Euro2012 Viz: Second Group Games

The second round of group games ended last night (sadly with Sweden’s elimination). Here is what the last number of days has done to the plots.

Read more »

Name popularity

June 15, 2012
By
Name popularity

This dynamic representation of the popularity of names over the years is a favorite. It’s not new, but I still find new things to appreciate, like names that used to apply to both sexes and now only one (Ellie), or vice versa (Harley). It seems l...

Read more »

Carnon [and Core, end]

June 15, 2012
By
Carnon [and Core, end]

Yet another full day working on Bayesian Core with Jean-Michel in Carnon… This morning, I ran along the canal for about an hour and at last saw some pink flamingos close enough to take pictures (if only to convince my daughter that there were flamingos in the area!). Then I worked full-time on the spatial

Read more »

Cubism Horizon Charts in R

June 15, 2012
By
Cubism Horizon Charts in R

Like many, I have been in awe of the d3.js and cubism.js visualization packages created by Mike Bostock. Mike Bostock @ Square talks about Time Series Visualization from Librato on Vimeo. The charts are beautiful and extraordinarily functional, so I th...

Read more »