Interactive web graphs with R – Overview and googleVis tutorial

[This article was first published on mages' blog, and kindly contributed to R-bloggers]. (You can report issue about the content on this page here)
Want to share your content on R-bloggers? click here if you have a blog, or here if you don't.

Today I feel very lucky, as I have been invited to the Royal Statistical Society conference to give a tutorial on interactive web graphs with R and googleVis.

I prepared my slides with RStudio, knitr, pandoc and slidy, similar to my Cambridge R talk. You can access the RSS slides online here and you find the original R-Markdown file on github. You will notice some HTML code in the file, which I had to use to overcome my knowledge gaps of Markdown or its limitations. However, my output format will always be HTML, so that should be ok. To convert the Rmd-file into a HTML slidy presentation execute the following statements on the command line:
Rscript -e "library(knitr); knit('googleVis_at_RSS_2012.Rmd')" pandoc -s -S -i -t slidy --mathjax googleVis_at_RSS_2012.md -o googleVis_at_RSS_2012.html

Maintaining R code formatting

While working on my slides I came across the tidy option in knitr. Setting the option tidy to false will maintain the original formatting of the code. This is actually quite helpful when I have longer code chunks. Here is a little example where by default (tidy=TRUE) the tidied code will not fit into one line of my presentation slide:
df <- data.frame(label=c("A", "B", "C"), val1=c(1,3,4), val2=c(23,12,32))


To leave a comment for the author, please follow the link and comment on their blog: mages' blog.

R-bloggers.com offers daily e-mail updates about R news and tutorials about learning R and many other topics. Click here if you're looking to post or find an R/data-science job.
Want to share your content on R-bloggers? click here if you have a blog, or here if you don't.

Never miss an update!
Subscribe to R-bloggers to receive
e-mails with the latest R posts.
(You will not see this message again.)

Click here to close (This popup will not appear again)