Monthly Archives: December 2012

More about Aggregation by Group in R

December 24, 2012
By
More about Aggregation by Group in R

Motivated by my young friend, HongMing Song, I managed to find more handy ways to calculate aggregated statistics by group in R. They require loading additional packages, plyr, doBy, Hmisc, and gdata, and are extremely user-friendly. In terms of CPU time, while the method with summarize() is as efficient as the 2nd method with by()

Read more »

Make a Christmas Tree in R with random ornaments/presents

December 24, 2012
By
Make a Christmas Tree in R with random ornaments/presents

Happy holidays!     Link to Gist

Read more »

24 Christmas Gifts from is.R

December 24, 2012
By
24 Christmas Gifts from is.R

The is.R blog has been on a roll in December with their Advent CalendaR feature: daily tips about R to unwrap each day leading up to Christmas. If you haven't been following it, start with today's post and scroll down. Sadly there isn't a tag to collect all these great posts together, but here are a few highlights: December...

Read more »

Miles of iles

December 24, 2012
By
Miles of iles

An explanation of quartiles, quintiles deciles, and boxplots. Previously “Again with variability of long-short decile tests” and its predecessor discusses using deciles but doesn’t say what they are. The *iles These are concepts that have to do with approximately equally sized groups created from sorted data. There are 4 groups with quartiles, 5 with quintiles … Continue reading...

Read more »

Latent Class Analysis with poLCA

December 24, 2012
By
Latent Class Analysis with poLCA

On an airplane the other day, I learned of a method called latent class (transition) analysis, and it sounded like an interesting thing to try in R. Of course, as with everything R, There is a Package for That, called poLCA, written by none other than Drew Linzer (of Votamatic fame) and Jeffrey Lewis. I...

Read more »

Labeling the Vertical Axis in R Plots

December 24, 2012
By
Labeling the Vertical Axis in R Plots

I show how to position the vertical axis label of an R plot above the axis and orient it horizontally as suggested by Stephen Few. I encourage you to share this with others and contribute to the conversation at Labeling the Vertical Axis in R Plots, which first appeared at carlislerainey.com. For more of my thoughts and...

Read more »

Identical Champions League Draw: What Were the Odds?

December 24, 2012
By
Identical Champions League Draw: What Were the Odds?

A number of news outlets have reported a peculiar quirk that arose during Friday’s Champions League draw. Apparently, the sport’s European governing body, UEFA, ran a trial run the day before the main event, and the schedule chosen during this event was identical to that of the actual draw on Friday. Given this strange coincidence,

Read more »

Aggregation by Group in R

December 23, 2012
By
Aggregation by Group in R

Efficiency Comparison among 4 Methods above

Read more »

My R year

December 23, 2012
By
My R year

End-of-year posts are corny but, what the heck, I think I can let myself delve in to corniness once a year. The following code gives a snapshot of what and how was R for me in 2012. outside.packages.2012 <- list(used.the.most = c('asreml', 'ggplot2'), largest.use.decline = c('MASS', 'lattice'), same.use = c('MCMCglmm', 'lme4'), would.like.use.more = 'JAGS')  

Read more »

Data Import Efficiency – A Case in R

December 23, 2012
By
Data Import Efficiency – A Case in R

Below is a piece of R snippet comparing the data import efficiencies among CSV, SQLITE, and HDF5. Similar to the case in Python posted yesterday, HDF5 shows the highest efficiency.

Read more »