# Monthly Archives: December 2009

## Abstract Data Type Operations in R

December 9, 2009
By

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 <- function(vector, item) { vector.lvalue.symbol <- substitute(vector) new.expression <- paste(vector.lvalue.symbol,

## Happy 1st Birthday, Revolutions!

December 9, 2009
By

Wow, doesn't time fly! It's hard to believe that this blog is one year old already: our first post was on December 9, 2008. I remember when we first had the idea of doing a blog exclusively devoted to R that some wondered if there would be enough news about R to warrant daily updates, but with the community...

## The top 5 R functions

December 9, 2009
By

John Myles White (who did the Canabalt scores analysis from last month) was trying to decide which R functions to spend time learning, and asked the obvious followup question: Which functions in R are used the most? With no readily-available answer, John answered the question himself, by counting the number of times each function is called in all the...

## Colour matching feature in R

December 8, 2009
By

I love R. It is an open-source statistical programming language that I found reasonably easy to learn, and find it incredibly versatile and useful. Because it's open-source anyone can contribute to it, and there are a huge number of packages that exten...

## Un-Wrapping a Sphere with R

December 8, 2009
By

Premise I was recently asked to print out a fabric pattern that could be used to cover a sphere, about the size of a ping pong ball, for the purposes of re-creating a favorite cat toy (quite important). Thinking this over, I realized that this was basically a map projection problem-- and could probably be solved by scaling...

## Package Update Roundup: Nov 2009

December 8, 2009
By

This is a list of new or updated packages that were released for R in November, as announced on the r-packages mailing list. To include other updates on this list, please email David Smith. For a complete list of all updates on CRAN, see the CRANberries archive for November 2009. Follow package name links for ratings and other information...

## Sciviews

December 8, 2009
By

I was finally able to get Sciviews (most of it) work on my Linux machine. As before, I got some error message when opening the R terminal for the first time; by ignoring the error messages and manually install several "sv" packages locally (into my hom...

## R Tutorial Series: Multiple Linear Regression

December 8, 2009
By

In R, multiple linear regression is only a small step away from simple linear regression. In fact, the same lm() function can be used for this technique, but with the addition of a one or more predictors. This tutorial will explore how R can be used to...

## R Function Usage Frequencies, Take 2

December 8, 2009
By

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 can grab it here This

## Implementing Push and Pop in R

December 7, 2009
By

Having grown up with Perl, there are two functions that I desperately miss while programming in R: push and pop. Continually writing 1 vector <- c(vector, new.entry) tries my patience, while writing 1 2 vector <- rep(NA, inscrutable.constant) vector <- new.entry makes me feel like I’m programming in C, rather than a higher-level programming language. That said, here’s a simplistic hack to provide