Tips & Tricks: R

Correlation Visualization

>> cor(data[6:9])
            IMDbRating Runtime        Year  NumVotes
IMDbRating 1.000000000      NA 0.008574095 0.5748866
Runtime             NA       1          NA        NA
Year       0.008574095      NA 1.000000000 0.5263616
NumVotes   0.574886602      NA 0.526361607 1.0000000
 
library(corrgram)
corrgram(data[6:9], upper.panel = panel.pie, lower.panel = panel.pts)
Corrgram_imdb
Computerworld’s Sharon Machlis shows examples for  5 data visualizations in 5 minutes: each in 5 lines or less of R . (Above is is my version of it using IMDB data). Also worth checking out are her favorite R packages for data visualization and munging

split-apply-combine

*apply family is covered by the extremely popular plyr package, however the base functions remain useful and worth knowing. See  apply function comparisons on stackoverflow Hadley Wickham's matrix below
From Hadley Wickham, slide 21 of http://www.slideshare.net/hadley/plyr-one-data-analytic-strategy:


[01] Analyze LinkedIn with R, Julian Hillebrand, March 18, 2015, URL: http://thinktostart.com/analyze-linkedin-with-r/
[02] R : How to Connect R to Database (Oracle) using RJDBC, ROracle or RODBC, Ankit Agarwal, 1st May 2014 URL: http://brazenly.blogspot.com/2014/05/r-how-to-connect-r-to-database-oracle.html
[03] R Tyler Rinker, URL: https://www.youtube.com/channel/UCOuzoXJpWWOFop7_nlJ5-hw/videos

Comments