Posts Tagged ‘ plyr ’

Which functions in plyr do people use?

November 2, 2012
By
Which functions in plyr do people use?

This is the question that Hadley Wickham recently set out to discovering by asking frequent R and plyr users how they use it in an online survey. Once a decent number of people have responded, Hadley quickly went forward and produced a short analysis of the plyr usage survey, and published it in RPubs.  With his permission, I am...

Read more »

Montreal R User Group meetup Nov. 14th

October 29, 2012
By
Montreal R User Group meetup Nov. 14th

After a bit of a summer lull, the Montreal R User Group is meeting up again! We’re trying out a new venue this time. Notman House is the home of the web in Montreal. They hold hackathons and other tech user group meetups, and they are all around great people in an all around great

Read more »

Congressional ideology by state

October 25, 2012
By
Congressional ideology by state

In a recent post, I illustrated how to add a background geom to your ggplot. While that code worked, and the plot looked fine, it was pointed out to me that I was missing an important aspect of plot layering with ggplot2. Namely, it is not, as I previ...

Read more »

Adding a background to your ggplot

October 19, 2012
By
Adding a background to your ggplot

I really enjoy using the DW-NOMINATE data for examples, as I do here. Sometimes it’s useful to indicate regions in the background of a plot — perhaps two-dimensional regions of interest, perhaps one-dimensional periods in time. It’s...

Read more »

The distribution of ideology in the U.S. House (with plyr)

October 17, 2012
By
The distribution of ideology in the U.S. House (with plyr)

This Gist has a couple of things going on, I’ll just list them: It downloads the entire history of U.S. House DW-NOMINATE scores from voteview.com It evaluates aggregate statistics, with members grouped by party and congress, with easy weighted ...

Read more »

Log odds ratios and an indicator matrix from categorical data

October 4, 2012
By
Log odds ratios and an indicator matrix from categorical data

A long title, but there are a couple of handy things in this Gist. The first, and more obscure, is the conversion of a data.frame of categorical variables into a matrix of dummy/binary/indicator variables, one for each category of each original variab...

Read more »

Transforming subsets of data in R with by, ddply and data.table

June 11, 2012
By
Transforming subsets of data in R with by, ddply and data.table

Transforming data sets with R is usually the starting point of my data analysis work. Here is a scenario which comes up from time to time: transform subsets of a data frame, based on context given in one or a combination of columns.As an example I use ...

Read more »

Montreal R workshop: Plyr, reshape and other data manipulation goodies

March 8, 2012
By
Montreal R workshop: Plyr, reshape and other data manipulation goodies

March 12, 2012 14h-16h N4/17 Stewart Biology Building, McGill University Étienne Low-Decarie, McGill University This workshop is organized by the BGSA and is free of charge (!), but space is limited. Register early to ensure your spot! From Étienne: Ever want to split your data according to factors, apply a function on each part and

Read more »

Say it in R with "by", "apply" and friends

January 28, 2012
By
Say it in R with "by", "apply" and friends

Iris versicolor (Source: Wikipedia)R is a language, as Luis Apiolaza pointed out in his recent post. This is absolutely true, and learning a programming language is not much different from learning a foreign language. It takes time and a lot of pr...

Read more »

Weecology can has new mammal dataset

December 29, 2011
By
Weecology can has new mammal dataset

So the Weecology folks have published a large dataset on mammal communities in a data paper in Ecology.  I know nothing about mammal communities, but that doesn't mean one can't play with the data...Their dataset consists of five csv files: &...

Read more »