## leaf area measuring — R package “EBImage”

July 9, 2012
By

Besides microscopic images in our routine, common photos are frequently taken to measure quantitative plant features, such as leaf area, root length, branch numbers, etc. Scientific software is available for manual processing. For example, to measure the root length, one need to use the … Continue reading →

## Network Visualization of Key Driver Analysis

July 8, 2012
By

Whatever happened to those evaluations that your airline asked you to complete after taking a flight? They ask you for a number of ratings about buying your ticket, attributes of the plane, the service you received, and if you were satisfied, if you wo...

## Bubble Plots (ggplot2)

July 8, 2012
By

1 Introduction Rarely have I seen a three dimension graph including time, value, and volatility. It is essenti

## New package RcppCNPy with release 0.1.0 (and 0.0.1 earlier last week)

A few days ago I had blogged about getting NumPy data in R by using a simple converter script. That works fine, but it is a little annoying to have to write an entire file only to read from it again. So I kept looking around for a better solution---and soon found the cnpy library by Carl Rogers which provides simple C++...

## Representation of numerical NA’s in R and the 1954 enigma

July 8, 2012
By

I've always wondered how exactly the missing value (NA) in R is represented under the hood. Last weekend I was working on a little project that gave me enough excuse to spend some time on finding this out. So, I … Continue reading →

## Fitting a dynamic model, and determining the number of parameters that can be fitted.

July 8, 2012
By

Let's suppose that we have the same dynamic model we presented before - that is, the Lorentz system of differential equations. Remember? In order to perform a fitting we need to define an objective function of sort: this will then be minimised. Now,...

## Universal portfolio, part 7

July 7, 2012
By

After reproducing all original figures and tables from Universal Portfolios, R coupled with modern processors allows to perform some more analysis.First we calculate the final wealth of the universal portfolio for all possible pairs of stocks, and...

## SMS analysis (coming from an Android smartphone or an IPhone)

July 7, 2012
By

At first, this post was intended to describe how to manipulate dates with R but, as the idea was coming from the question of one of my students who wanted to analyze his SMS, I thought that I might as well also explain the whole analysis process... Using my new smartphone (that I started to

## The Actuary Puzzle 508 – Square numbers

The Actuary Puzzle 508 - Square numbers Author: Matt Malin From the puzzle pages of The Actuary June 2012, I attempt to solve the following, making use of R: This square contains exactly 21 smaller squares. Each of these smaller squares has sides of integer length, with no two smaller squares having sides of the same length. Can you find a solution for...

## Timeline graph with ggplot2

July 7, 2012
By

This post shows how to create a timeline graph by using ggplot2. Let’s start by loading the ggplot2 library. Next let’s create a dataset which we will use to feed the graph. In the last column (y), I create random positive values for the first three rows (which will be  Read more...

## Graphical insights from the 2012 UseR! Meeting

About this time last month, I attended the 2012 UseR! Meeting.  Now an annual event, this series of conferences started in Europe in 2004 as an every-other-year gathering that now seems to alternate between the U.S. and Europe.  This year’s meeting was held on the VanderbiltUniversity campus in Nashville, TN, and it was attended by about 500 R aficionados,...

## R, knitr & markdown = HTML

July 7, 2012
By

Welcome to this demo of how R code and results can be combined into an HTML report. This entire blogpost was generated by using a combination of R, knitr and markdown. Beforehand, make sure you have the following libraries installed (latest version); knitr markdown ggplot2 (to run the example script)  Read more »

## Project Euler — problem 12

July 7, 2012
By

Going to supper in 20 minutes. I’d like to type down my solution to the 12th Euler problem, just make my time count. The sequence of triangle numbers is generated by adding the natural numbers. So the 7th triangle number … Continue reading →

## ggplot2 – much easier with JGR and Deducer

July 7, 2012
By

In the last R-User meeting in Cologne, we had a discussion about using ggplot2 – and I gave a short introduction of how to use ggplot2 with JGR and Deducer. Basically, JGR is a Graphical User Interface for R, and Deducer is a kind of “data analysis plugin”, that also comes with a so-called “plot

July 6, 2012
By

## Three hours of pure soccer emotion, visualized with R

July 6, 2012
By

The biggest prize in UK soccer, the Premier League Championship, is decided by a points system. Unlike most sports competitions, there's no final round or playoff series: once the regular round of games is complete, the team that has accumulated the most points (three for a win, and one for a draw) is the champion of English football. In...

## Soda vs. Pop with Twitter

July 6, 2012
By

One of the great things about Twitter is that it’s a global conversation anyone can join anytime. Eavesdropping on the world, what what! Of course, it gets even better when you can mine all this chatter to study the way humans live and interact. For example, how do people in New York City differ from those in Silicon Valley? We...

## Error metrics for multi-class problems in R: beyond Accuracy and Kappa

July 6, 2012
By

The caret package for R provides a variety of error metrics for regression models and 2-class classification models, but only calculates Accuracy and Kappa for multi-class models.  Therefore, I wrote the following function to allow caret:::train t...

## RSAP, Rook and ERP

As I wrote in my blog Analytics with SAP and R (Windows version) we can use RSAP to connect to our ERP system and play with the data. This time I wanted of course, to keep exploring the capabilities of RSAP, but using something else. As everybody kno...

## Fix Overplotting with Colored Contour Lines

July 6, 2012
By

I saw this plot in the supplement of a recent paper comparing microarray results to RNA-seq results. Nothing earth-shattering in the paper - you've probably seen a similar comparison many times before - but I liked how they solved the overplotting...

## Interest Differencing: Folk Commonly Followed by Tweeting MPs of Different Parties

July 6, 2012
By

Earlier this year I doodled a recipe for comparing the folk commonly followed by users of a couple of BBC programme hashtags (Social Media Interest Maps of Newsnight and BBCQT Twitterers). Prompted in part by a tweet from Michael [email protected] about generating an ESP map for UK politicians (something I’ve also doodled before – Sketching

## A practical introduction to garch modeling

July 6, 2012
By

We look at volatility clustering, and some aspects of modeling it with a univariate GARCH(1,1) model. Volatility clustering Volatility clustering — the phenomenon of there being periods of relative calm and periods of high volatility — is a seemingly universal attribute of market data.  There is no universally accepted explanation of it. GARCH (Generalized AutoRegressive … Continue reading...

## The R Journal Volume 4/1

July 6, 2012
By

The 'Summer edition' of the R Journal is out! Get it from here.

## automated cell phenotyping — R package “EBImage”

July 5, 2012
By

Counting cells under microscope is always laborious and null. Those in the art would be relieved with assistance of a powerful image processing package, EBImage. Images are treated as “Image” objects, essentially multi-dimensional arrays. The class “Image” contains spatial information, pixel … Continue reading →

## Soda vs. Pop with Twitter

July 5, 2012
By

One of the great things about Twitter is that it’s a global conversation anyone can join anytime. Eavesdropping on the world, what what! Of course, it gets even better when you can mine all this chatter to study the way humans live and interact. For example, how do people in New York City differ from those...

## More Exploration of Crazy RUT

July 5, 2012
By

Unintentionally while playing with the lawstat package in R, I started trying to build systems (STANDARD DISCLAIMER: NOT INVESTMENT ADVICE AND WILL LOSE LOTS OF MONEY SO PROCEED WITH CAUTION) based on the Jarque Bera test of normality (entry in Wikiped...

## A better ‘nls’ (?)

July 5, 2012
By

Those that do a lot of nonlinear regression will love the nls function of R. In most of the cases it works really well, but there are some mishaps that can occur when using bad starting values for the parameters. One of the most dreaded is the “singular gradient matrix at initial parameter estimates” which

## Health Care Costs – Part 1, "The Problem"

July 5, 2012
By

The Problem In the United States, health care costs have been going up for a number of years, even when adjusted for inflation. Not unlike a runaway freight train, this rampant inflation cannot continue indefinitely without crashing. ...

## New R User Group in Leipzig, Germany

July 5, 2012
By

Leipzig R Statistical Computing is the sixth local R user group in Germany, and has been holding meetings since February. In the next meeting on July 12, member Claudia Beleites will talk about her pacakges softclassval (for classifier performance measures) and hyperspec (for hyperspectral data). meetup.com: Leipzig R Statistical Computing