23

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

em70
  • 6,088
  • 6
  • 48
  • 80

7 Answers7

16

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

Sacha Epskamp
  • 46,463
  • 20
  • 113
  • 131
12

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.

Gavin Simpson
  • 170,508
  • 25
  • 396
  • 453
richiemorrisroe
  • 9,307
  • 3
  • 22
  • 20
7

I've done similar things, and here are some things that I included as good examples;

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.

Gavin Simpson
  • 170,508
  • 25
  • 396
  • 453
PaulHurleyuk
  • 8,009
  • 15
  • 54
  • 78
6

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.

Prasad Chalasani
  • 19,912
  • 7
  • 51
  • 73
2

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.

Paolo
  • 2,795
  • 1
  • 20
  • 23
1

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

Patrick McCann
  • 484
  • 4
  • 11
1

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.

Community
  • 1
  • 1
Matt Bannert
  • 27,631
  • 38
  • 141
  • 207