new R package : bibtex

December 11, 2009
By

I've pushed to CRAN the package bibtex package The package defines the read.bib function that reads a file in the bibtex format. The code is based on bibparse The read.bib function generates an object of class citationList, just like utils::citation

Read more »

Struggling with apply() in R

December 11, 2009
By
Struggling with apply() in R

It’s common knowledge that I struggle wrapping my head around the apply functions in R. That is illustrated very clearly in the following discussion on Stack Overflow: Dirk’s comment is actually spot on. I’ve asked the same damn question at least 4-5 times. Only I didn’t really understand it was the same question. That’s one of

Read more »

Must-Have R Packages for Social Scientists

December 11, 2009
By
Must-Have R Packages for Social Scientists

After recently having to think critically about the value of various R packages for social science research, I realized that others might find value in a post on “must-have” R packages for social scientists. After the immensely popular post on this topic for Python packages a follow-up seemed appropraite. If you conduct social

Read more »

R> if (done=TRUE) tweet me!

December 11, 2009
By
R> if (done=TRUE) tweet me!

Let’s say that you’re fitting a cumbersome model so time is not to waste over a PC staring at the screen half anxious-half bored… Then, you can always leave and go on with meetings and all your daily routine and have R notify you the results! How? We will illustrate the situation above using some Bayesian Model

Read more »

Because it’s Friday: Detecting Cylons

December 11, 2009
By
Because it’s Friday: Detecting Cylons

Battlestar Galactica (Ronald D Moore's reimagined version of the rather cheesy 70's sci-fi series) has been my favourite TV series (of any genre) of recent years, so I'm especially excited that Chris Bilder has given me the chance to blog about it. Chris, an Associate Professor in the Department of Statistics at the University of Nebraska-Lincoln, recently published an...

Read more »

A Lot of Deaths are Partly Self-Induced

December 11, 2009
By

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 more resources had been invested in prolonging life.

Read more »

Times Series Methods versus Recurrence Relations

December 10, 2009
By

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. When Carmona defined the AR(p) model in class

Read more »

APIs: I wish the life sciences would learn from social networks

December 10, 2009
By
APIs: I wish the life sciences would learn from social networks

I was prompted by a thread on the apparent decline of FriendFeed to look for evidence of declining participation in my networks. First, a quick and dirty Ruby script, tls.rb to grab the Life Scientists feed and count the likes and comments: #!/usr/bin/ruby require 'rubygems' require 'json/pure' require 'net/http' require 'open-uri' def format_date(d) if d

Read more »

Demography package

December 10, 2009
By
Demography package

This package seems useful for demographers.

Read more »

The R Graphical Manual

December 10, 2009
By

R has a lot of functions. Add in all the packages on CRAN, and then there's a lot of functions. You can search through the contents of the function documentation at places like Rseek.org, but the R Graphical Manual takes a different tack on exploring the functions in R: rather than browsing by the name or description of the...

Read more »

“Introducing Monte Carlo Methods with R” is out!

December 9, 2009
By
“Introducing Monte Carlo Methods with R” is out!

That’s it!, “Introducing Monte Carlo Methods with R” is out, truly out, I have received a copy from Springer by express mail today! (If you need any further proof, it is also advertised as In stock by Amazon.) Given that the printer exactly reproduces the pdf file sent to Springer, there is no element of

Read more »

OpenMx with mixture distribution support

December 9, 2009
By
OpenMx with mixture distribution support

A new version of OpenMx is out; this time it comes with mixture distribution, according to this announcement. I can't wait to test the new features out!

Read more »

Announcing R-bloggers.com: a new R news site (for bloggers by bloggers)

December 9, 2009
By
Announcing R-bloggers.com: a new R news site (for bloggers by bloggers)

I already wrote about R-bloggers on the R mailing list, so it only seems fitting to write about it more here. I will explain what R-bloggers is and then move to explain what I hope it will accomplish. R-Bloggers.com is a central hub of content collected from bloggers who write about R (in English) and if

Read more »

R Function Usage Frequencies, Addendum

December 9, 2009
By

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
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,

Read more »

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...

Read more »

The top 5 R functions

December 9, 2009
By
The top 5 R functions

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...

Read more »

Colour matching feature in R

December 8, 2009
By
Colour matching feature in R

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...

Read more »

Un-Wrapping a Sphere with R

December 8, 2009
By
Un-Wrapping a Sphere with R

  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...

Read more »

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...

Read more »

Sciviews

December 8, 2009
By
Sciviews

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...

Read more »

R Tutorial Series: Multiple Linear Regression

December 8, 2009
By
R Tutorial Series: Multiple Linear Regression

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...

Read more »

R Function Usage Frequencies, Take 2

December 8, 2009
By
R Function Usage Frequencies, Take 2

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

Read more »

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

Read more »

R, REvolution named in top analytic trends for 2010

December 7, 2009
By

Author and enterprise software executive Nenshad Bardoliwalla lists his Top 10 Trends for 2010 in Analytics, Business Intelligence, and Performance Management at the website Enterprise Irregulars. If you've been following the Business Intelligence space (and who hasn't, right?) you'll recognize some familiar themes: predictive analytics, Web 2.0, Software-as-a-Service, risk, IBM. What's interesting about this list is that it raises...

Read more »

Advanced SNA with R, via Harvard Political Nets Conference

December 7, 2009
By

End of semester madness has begun, so posting will likely be light this week. To keep you busy, David Lazer recently posted the five video series of the Goudreau-Hunter tutorial on social network analysis using R from the 2009 Harvard Political Networks Conference. Each video run about 60 minutes, so these will literally provide hours

Read more »

R Function Usage Frequencies

December 7, 2009
By
R Function Usage Frequencies

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 applied to spoken languages as

Read more »

Understanding the Science of CO2’s Role in Climate Change: 3 – How Green House Gases Trap Heat

December 7, 2009
By
Understanding the Science of CO2’s Role in Climate Change: 3 – How Green House Gases Trap Heat

This post, the 3rd (1st here, 2nd  here) in the series on Understanding the Science of CO2’s Role in Climate Change, discusses how water vapor, CO2, CH4, O3 and N2O  absorb and emit the Earth’s longwave radiation, changing the Earth’s energy balance. I’ve made a 5 panel chart that shows spectra data for 5  greenhouse

Read more »

A web application for R’s ggplot2

December 7, 2009
By

One of the exciting new frontiers for R programming is of creating website interfaces to R code. At the forefront of this domain is a young and (very) bright man called Jeroen Ooms, whom I had the pleasure of meeting at useR 2009 (press the link to see his presentation). Today Jeroen announced a new version (0.11)

Read more »