R demos for presentation [closed]
I know this is barely programming related, but I'll have to show some intuitive, straightforward and possibly very appealing R presentation so that a department at my current institution will start to evaluate its adoption. Does anyone of you know any R script that shows the power, simplicity and flexibility of R? I'm looking especially for scripts belonging to two categories:
- easy code showing how quick it is to calculate descriptives,开发者_运维问答 basic plots like barchart, boxplots, simple linear regression - all of that concisely and beautifully
- code showing fancy visualizations of complex multivariate datasets (ie. heatmaps etc)
Interactivity for scripts belonging to the second category is a plus.
Of course having data to use with the scripts would also be appreciated ;)
Thanks in advance
Quick-R is a nice site for some examples on how you can easilly do a ton of useful stuff in R:
http://www.statmethods.net/
For fancy visualizations, check out some of the examples from my package qgraph
:)
http://sites.google.com/site/qgraphproject/examples
Most of those pictures are included in the help files ( ?qgraph.pca
, ?qgraph.efa
)
And of course check out examples from ggplot2
The demo()
command is your friend. Use the ones for lattice and ggplot2 and you'll soon convert people to R through the extremely high quality graphics.
I've done similar things, and here are some things that I included as good examples;
- Grabbing data from a Wikipedia page, process and display a graph of the explosion in colours of Crayola crayons since they were introduced, all in thirty lines of code (http://www.r-bloggers.com/ggplot2-crayola-crayon-colours/)
- Showing the exponential rise of R packages on CRAN over time (http://journal.r-project.org/archive/2009-2/RJournal_2009-2_Fox.pdf)
- How the New York Times used R to create an amazing infographic showing the hits of Michael Jackson in the three hours after his death (http://www.nytimes.com/interactive/2009/06/25/arts/0625-jackson-graphic.html)
- Pretty much any of the examples for ggplot2, because of my area of expertise, I often do these (http://had.co.nz/ggplot2/)
I shoe-horned most of these, and a few work-specific ones into a Sweave file that used the Beamer Poster styles to produce a scientific poster that compiles itself, and can pull current datasets every time, which always seems to impress.
And let's not forget the googleVis
package (an R interface to the Google Visualization API), to produce cool motion-charts (as seen in the "Joy of Stats" videos by Hans Rosling) with just a couple lines of code. Although perhaps not directly relevant to what the original question asked for, showing that R now has a spiffy IDE called RStudio can also help convince people to adopt R, especially those who think that Matlab has a nice editor and R doesn't.
The AniWiki web site containing a gallery of statistical animations produced using the animation package by Yihui Xie could be of some use to you.
Faraway's book has tons of great code you can copy and paste in, appendix C seems to be what you need to start out
http://cran.r-project.org/doc/contrib/Faraway-PRA.pdf
I had a similar discussion How to market R at your institute? first here at SO which was moved later on to programmers. Maybe it's not as concrete as this one, but still you might find some synergies.
精彩评论