Posts Tagged ‘ reshape ’

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 »

Distribution of colors by flag

October 22, 2012
By
Distribution of colors by flag

A story: We showed you how to use R to assess flag similarity and make a scatter plot of raster images. Dr. Wickham referred us to the set of 2400 flag icons made available by GoSquared, and then (probably jokingly) challenged us to replicate the cool...

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 »

Optimal seriation for your matrices

September 28, 2012
By
Optimal seriation for your matrices

In our previous post, we used a quick-and-dirty method for ordering the axes on our heatmap. It has been pointed out to me that There is a Package for That (which is my nominee for a new slogan for R — not that it needs a slogan). seriation offe...

Read more »

reshape (from base) Explained: Part II

May 5, 2012
By
reshape (from base) Explained: Part II

Part II Explains More Complex  Wide to Long With base reshape  In part I of this base reshape tutorial we went over the basics of reshaping data with reshape.  We learned two rules that help us to be more efficient … Continue reading →

Read more »

reshape (from base) Explained: Part I

May 2, 2012
By
reshape (from base) Explained: Part I

This Post Will Explain the Basics of Wide to Long With base reshape (part I) Often your data set is in wide format and some sort of analysis or visualization requires putting the data set into long format.  Hadely Wickham … Continue reading →

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 »

Reshaping the IT world

February 16, 2012
By
Reshaping the IT world

During my university time I worked on the IT help desk for a while. One day I received a call from a professor, who said that his printer had stopped working. So I asked him, if there was a message on the display and if he could read it to me. "Oh yes"...

Read more »

The reshape function

February 9, 2012
By
The reshape function

The other day I wrote about the R functions by, apply and friends, which allow me to operate on subsets of data. All those functions work nicely, if the data is given in the right format. More often than not it isn't and I have to reshape the data befo...

Read more »

Printing nested tables in R – bridging between the {reshape} and {tables} packages

January 29, 2012
By
Printing nested tables in R – bridging between the {reshape} and {tables} packages

This post shows how to print a prettier nested pivot table, created using the {reshape} package (similar to what you would get with Microsoft Excel), so you could print it either in the R terminal or as a LaTeX table. This task is done by bridging between the cast_df object produced by the {reshape} package,

Read more »