Initial impressions of RangeLab

I was rummaging around in the source of R looking for trouble, as one does, when I came across what I believed to be a less than optimally accurate floating-point algorithm (function R_pos_di in src/main/arithemtic.c). Analyzing the accuracy of floating-point code is notoriously difficult and … Continue reading

Happy Holidays and Best Wishes for 2012

This is just a quick note to wish you and your family a very healthy and happy holidays and wonderful New Year! I hope you enjoyed reading my blog and thank you for your comments and emails. Here is a short R code that implements an interesting idea from the Charting the Santa Claus Rally post by … Continue reading

The art of R programming

This is a gem of a book. It will become the book I give PhD students when they are learning how to write good R code. That is, if I ever see it again. I had hoped to write a review of it, but I haven’t seen it since it arrived in the mail a couple of weeks ago because a research student or … Continue reading

Learning R as a language

Books written to teach a general purpose programming language are usually organized according to the features of the language and examples often show how a particular language feature is interpreted by a compiler. Books about domain specific languages are usually organized in a way that makes … Continue reading

A/B Testing in R – Part 1

A/B testing is a method for comparing the effectiveness of several different variations of a web page. For example, an online clothing retailer that specializes in mens’ streetwear may want to examine whether a black or pink background results in more purchases from visitors to the site. Lets … Continue reading

A nice short article on memory in R

There is a nice short article on memory issue in R at http://www.matthewckeller.com/html/memory.html. If you use R to process large data, you might find it helpful. It introduces: - checking how much memory an object is taking; - the memory limit of 32-bit R and 64-bit R; - package designed to … Continue reading

Sermon Sentiment Analysis

Matt Chandler vs. Mark Driscoll I came across an interesting API from Viral Heat which is capable of “Sentiment Analysis.” This analysis is designed to capture the sentiment of a statement by ranking it on a scale from -1 to 1. For instance, a chipper sentence like “The smell of … Continue reading

Home Runs heating up?

My intuition tells me that objects traveling through the air would meet more resistance when there is more moisture in the air. It turns out that my intuition is wrong. It still doesn’t make sense to me but apparently humid air is less dense. And this applies to baseball specifically because … Continue reading

R 101: The Subset Function

The subset function is available in base R and can be used to return subsets of a vector, martix, or data frame which meet a particular condition. In my three years of using R, I have repeatedly used the subset() function and believe that it is the most useful tool for selecting elements of a data … Continue reading