A simple plot takes a few lines of coding:g1 <- ggplot(d, aes(birth.year))g2 <- g1 + geom_line(aes(y=alive0, linetype="Famale")) + geom_line(aes(y=alive1, linetype="Male")) + scale_linetype_discrete(name = "")g3 <- g2 + geom_point(aes(y=...

Today we will use R to extract some interesting summary statistics regarding the music files stored in the computer. For all mp3 files I keep certain metadata in their ID3 tag. We will use this information to explore the distribution of music files with respect to the year of release. All the following are done

After I realized that some aspects of R’s implementation are rather inefficient, one of the first things I looked at was matrix multiplication. There I found a huge performance penalty for many matrix multiplies, a penalty which remains in the current version, 2.13.0. As discussed below, eliminating this penalty speeds up long vector dot products

On April 22, David Landy posed a question about the distribution of interestingness values in response to my April 3rd post on “Interestingness Measures.” He noted that the survey paper by Hilderman and Hamilton that I cited there makes the following comment: “Our belief is that a useful measure of interestingness should generate index values that are reasonably distributed throughout...

When clearing out some of my old programming books the other day I realised how far I’d come with programming over the years, and the number of different technologies that I have used over time. I thought I’d do a little summary post going from first programming experience to now – and it’s amazing what’s

I was browsing through the draft abstract booklet for this year's worldwide R user conference useR! 2011, and noticed this abstract: KinectR – Kinect interface to R Landon Jensen Microsoft launched the Kinect for Xbox 360 in late 2010 and it quickly broke records as the fastest selling consumer electronics device in history (8 million units sold in the...

In a previous post I introduced the following game: Suppose you play the following game: Someone holds a set of cards with the numbers {1,2,…,N} in random order, opens up the first card and asks if the next card is greater or smaller. Every time you predict correctly, you get one point, while every wrong

Recently I found a post at FlowingData with a detailed tutorial to map connections with great circles with R. The tutorial of FlowingData is excellent, but I feel more comfortable with the sp classes and methods, and with the lattice and latticeExtra packages. Besides, I want to use the free spatial data available from the

10. Can't crack that hard Sudoku problem?? Use R!9. Want to pick a skill that will give you an early adopter advantage?? Learn R! It is the leading open source statistical and data analysis programming language, and is heating up! 8. Need to ...

10. Can't crack that hard Sudoku problem?? Use R!9. Want to pick a skill that will give you an early adopter advantage?? Learn R! It is the leading open source statistical and data analysis programming language, and is heating up! 8. Need to ...

If your WordPress blog is hosted at WordPress.com (like this one), you may know that source code in posts is formatted and highlighted using a shortcode, as explained here. Until recently, R was not on the list of supported languages (neither was Perl), but I noticed today that both of them are now supported. This

It is possible to show that the square root of two can be expressed as an infinite continued fraction. √ 2 = 1 + 1/(2 + 1/(2 + 1/(2 + … ))) = 1.414213… By expanding this for the first four iterations, we get: Read More: 547 Words Totally

Some years ago, Google discovered that when people are concerned about influenza, they search for flu-related information and that to some extent, search traffic is an indicator of flu activity. Google Flu Trends was born. Illness is sweeping through our department this week and I have succumbed. It’s not flu but at one point, I

Here are a few more plotting options for boxplots: Let’s start plotting the full set plot(b$mod, b$x) Plot labels for a subset in full set plot (label all points x < -1) text(subset(b$mod, b$x < -1), subset(b$x, b$x < -1), … Continue reading →

Hadley Wickham, the Rice professor and prolific R hacker best known as the author of the ggplot2 graphics package, will be coming to San Francisco June 8-9 to deliver his new R Development Master Class (in conjunction with Revolution Analytics). This course will build on the skills of basic R programmers with instruction in advanced R programming techniques, development...