# Articles by John Myles White

January 9, 2010 |

In further support of the claim that a lot of deaths are partly self-induced, here’s a fascinating piece by Wired on the extraordinary rise in the percent of deaths among the young caused by their own poor decisions. It’s remarkable that, for the young, modern science has already ... [Read more...]

### Announcing r-ORM: A Pure R Object-Relational Mapper

January 5, 2010 |

My apologies for the long break between posts. Before the end of this week I’ll return to my series of posts on image processing in R. In the intervening time, I’ve finished a piece of code that I’d like to officially release to the public. The code ... [Read more...]

### Using Complex Numbers in R

December 18, 2009 |

This post is a continuation of my series dealing with matrix operations for image processing. My next goal is to demonstrate the construction of simple low-pass and high-pass spatial frequency filters in R. It’s easy enough to construct simple versions of these filters in R using the Fast Fourier ... [Read more...]

### Image Compression with the SVD in R

December 17, 2009 |

Over the next few posts, I’m going to be reviewing the use of R to implement the most commonly used matrix techniques for image manipulation. The code will be surprisingly simple to understand, because the real magic behind these techniques lies in the mathematics that R provides an abstract ... [Read more...]

### Quick Review of Matrix Algebra in R

December 16, 2009 |

Lately, I’ve been running a series of fMRI experiments on visual perception. In the interests of understanding the underlying properties of the images I’m using as stimuli, I’ve been trying to learn more about the matrix transformations commonly used for image compression and image manipulation. Thankfully, R ... [Read more...]

### Object-Oriented Programming in R: The Setter Methods

December 14, 2009 |

With a little guidance from the indefatigable Hadley Wickham, I figured out today how to implement the setter methods that were missing from my example user class. To review, let’s rebuild the getter methods for my user object: 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 [...] [Read more...]

### The Most Basic Elements of Object-Oriented Programming in R

December 13, 2009 |

Until recently, I’ve never had any reason to learn how to define my own classes in R. Having learned this week, I was surprised to find out how easy it is to start implementing classes in R. If you know nothing about creating classes and class methods in R, ... [Read more...]

### A Lot of Deaths are Partly Self-Induced

December 11, 2009 |

I’m a little surprised by Andrew Gelman’s post today, doubting the wisdom of a passage from Gary Becker’s work that reads: According to the economic approach, therefore, most (if not all!) deaths are to some extent “suicides” in the sense that they could have been postponed if ... [Read more...]

### Times Series Methods versus Recurrence Relations

December 10, 2009 |

This term, I’ve been sitting in on Rene Carmona’s course on Modern Regression and Time Series Analysis. Much of the material on regression covered in the course was familiar to me already, but I’ve never felt that I had a real command of times series analysis methods. ... [Read more...]

### R Function Usage Frequencies, Addendum

December 9, 2009 |

Since people have asked, here is a GitHub page with all of the code used to generate my R function usage analyses: cran-function-usage-analysis. [Read more...]

### Abstract Data Type Operations in R

December 9, 2009 |

This morning, I got a chance to read enough of the R Language Definition to finish my implementations of push and pop. While I was at it, I also wrote implementations of unshift, shift, queue and dequeue. Here they are: 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 push [Read more...]

### R Function Usage Frequencies, Take 2

December 8, 2009 |

Yesterday, Hadley Wickham commented on my post on the frequency of calling various R functions that it would be helpful to have the number of packages that call a function in addition to the number of times that the function is called. I compiled the relevant data last night: you ... [Read more...]

### Implementing Push and Pop in R

December 7, 2009 |

Having grown up with Perl, there are two functions that I desperately miss while programming in R: push and pop. Continually writing 1 vector [Read more...]

### R Function Usage Frequencies

December 7, 2009 |

A few months ago I decided to apply word frequency analysis ideas to R code. My idea was simple: the functions that one should invest the most effort into learning are precisely those functions that are used most frequently in real world code. In fact, this simple idea can be ... [Read more...]

### The Top Scores for Canabalt, Take 2

November 15, 2009 |

Introduction As promised on Thursday, here’s my second pass at a statistical analysis of Canabalt scores. There are some useful results I’ll present right at the start, and then there are some results that are more or less worthless, except that working through my own mistakes helped me ... [Read more...]

### Canabalt

November 12, 2009 |

At the office today, I got into a discussion with two of my fellow graduate students about the distribution of scores you can get while playing Canabalt. Because (1) the layout of the levels in the game is fully randomized and (2) the difficulty of certain actions (specifically jumping through windows) is ... [Read more...]

### The Second Coming

June 18, 2009 |

Pew Research has found that 79% of Americans believe in The Second Coming of Jesus. What worries me more is not that 4 out of 5 Americans believe in The Second Coming, but that 1 out of 5 believes it will happen in their lifetime. It seems inevitable t... [Read more...]

### Marriage and Happiness

April 7, 2009 |

The Pew Research Center just published a piece reviewing their finding that people who are married report significantly greater levels of happiness than those who are unmarried. I always enjoy this result, particularly because of contemporary Western c... [Read more...]

### American Immigration Trends

March 22, 2009 |

The New York Times has a beautiful visualization of immigration trends in the United States since 1880. I highly recommend spending a few minutes playing with the interactive display. [Read more...]

### Causation’s Mistreated Sibling Correlation

March 6, 2009 |

This is why I love XKCD, though surely the best part of this strip was the mouseover: “correlation doesn’t imply causation, but it does waggle its eyebrows suggestively and gesture furtively while mouthing, ‘look over there’.” [Read more...]
1 3 4 5 6