Running RStudio via Docker in the Cloud
My aim was to rent some resources in the cloud, pull an RStudio Server container and run RStudio in a browser. It was actually surprisingly simple to get started.
I chose Digital Ocean as my cloud provider. They have many Linux systems to choose from and also a pre-built Docker system.
After about a minute I had kicked off the Docker droplet I could log into the system in a browser window and start pulling the Docker file, e.g. Dirk's container.
Once the downloads finished I could start the RStudio Server using the
docker run command and log into a RStudio session. To my surprise even my googleVis package worked out of the box. The plot command opened just another browser window to display the chart; here the output of the WorldBank demo.All of this was done within minutes in a browser window. I didn't even use a terminal window. So, that's how you run R on an iPad. Considering that the cost for the server was $0.015 per hour, I wonder why I should buy my own server, or indeed buy a new computer.
Thanks to R Markdown: Perhaps Word is an option after all?
I have been using R Markdown for a while now and have grown very fond of it. Although I am quite happy with PDF and HTML output for basic reports and to switch to Sweave/LaTeX for more complex documents, I was pleasantly surprised to learn that the new version of RStudio can produce MS Word files directly from R Markdown as well; thanks to the power of pandoc. Perhaps Word is an option after all?
googleVis 0.4.7 with RStudio integration on CRAN
Over 80% in my little survey favoured the new default output mechanism of googleVis within RStudio. Hence, I uploaded googleVis 0.4.7 on CRAN over the weekend.
However, there were also some thoughtful comments, which suggested that the RStudio Viewer pane is not always the best option. Indeed, Flash charts and gvisMerge output will still be displayed in your default browser, but also if you work on larger charts and with smaller screen, then the browser might still be the better option compared to the Viewer pane - of course you can launch the browser from the Viewer pane as well.
Hence, googleVis gained a new option
'googleVis.viewer' that controls the default output of the googleVis plot method. On package load it is set to getOption("viewer") and if you use RStudio, then its viewer pane will be used for displaying non-Flash and un-merged charts. You can set options("googleVis.viewer" = NULL) and the googleVis plot function will open all output in the default browser again. Thanks to J.J. from RStudio for the tip. The screen shot below shows a geo chart within the RStudio Viewer pane of the
devastating typhoon track of Haiyan that hit Southeast Asia last week.
Session Info
RStudio v0.98.456 and R version 3.0.2 (2013-09-25)Platform: x86_64-apple-darwin10.8.0 (64-bit)
locale:
[1] en_GB.UTF-8/en_GB.UTF-8/en_GB.UTF-8/C/en_GB.UTF-8/en_GB.UTF-8
attached base packages:
[1] stats graphics grDevices utils datasets methods
[7] base
other attached packages:
[1] googleVis_0.4.7 XML_3.95-0.2
loaded via a namespace (and not attached):
[1] RJSONIO_1.0-3 tools_3.0.2
Display googleVis charts within RStudio
I think this is a rather nice feature and hence I have updated the plot method in googleVis to use the RStudio viewer pane as the default output. If you use another editor, or if the plot is using one of the Flash based charts, then the browser is still the default display.
The behaviour can also be controlled via the option
viewer. Set options("viewer"=NULL) and googleVis will plot all output in the browser again.Of course shiny apps can also run in the viewer pane. Here is the example of the
renderGvis help page of googleVis. For more information about the new viewer pane see the online RStudio documentation. For the time being you can get the next version 0.4.6 of googleVis from our project site only. Please get in touch if you find any issues or bugs with this version, or add them to our issues list.
Is this a step in the right direction? Please use the voting buttons below.
Session Info
R Under development (unstable) (2013-10-25 r64109)
Platform: x86_64-apple-darwin10.8.0 (64-bit)
locale:
[1] en_GB.UTF-8/en_GB.UTF-8/en_GB.UTF-8/C/en_GB.UTF-8/en_GB.UTF-8
attached base packages:
[1] stats graphics grDevices utils datasets methods base
other attached packages:
[1] googleVis_0.4.6
loaded via a namespace (and not attached):
[1] RJSONIO_1.0-3 tools_3.1.0
First steps of using googleVis on shiny

However, before we upload the next version of googleVis to CRAN we decided to present a preview of version 0.4.0 here, asking for feedback. It would not be fair on the guys behind CRAN to release something into the wild, only to be told by users within a few days that we missed something. Hence, you can get the new version of googleVis only from the download page of our project site for the time being.
You may have read the post on RStudio's blog that the shiny API changed slightly: the
reactivePlot and reactiveText functions have been renamed to renderPlot and renderText with simplified input parameters. Thanks to Joe, there is now also a renderGvis function as part of the googleVis package, which works in very much the same way as the other two. To run the following examples you need shiny version 0.4.0 and googleVis version 0.4.0 or higher.
googleVis 0.3.2 is released: Better integration with knitr
So what's new in googleVis 0.3.2?
The default behaviour of the functionsprint.gvis and plot.gvis can be set via options(). Now this doesn't sound too exciting but it can be tremendously helpful when you write Markdown files for
knitr. Here is why:Interactive HTML presentation with R, googleVis, knitr, pandoc and slidy
Tonight I will give a talk at the Cambridge R user group about googleVis. Following my good experience with knitr and RStudio to create interactive reports, I thought that I should try to create the slides in the same way as well.
Christopher Gandrud's recent post reminded me of deck.js, a JavaScript library for interactive html slides, which I have used in the past, but as Christopher experienced, it is currently not that straightforward to use with R and knitr.
Thus, I decided to try slidy in combination with knitr and pandoc. And it worked nicely.
I used RStudio again to edit my Rmd-file and knitr to generate the Markdown md-file output. Following this I run pandoc on the command line to convert the md-file into a single slidy html-file:
Et volià, here is the result:pandoc -s -S -i -t slidy --mathjax Cambridge_R_googleVis_with_knitr_and_RStudio_May_2012.md -o Cambridge_R_googleVis_with_knitr_and_RStudio_May_2012.html
Addition (2 June 2012)
Oh boy, knitr and Markdown are hitting a nail. With slidify by Ramnath Vaidyanathan another project sprung up to ease the creation of web presentations.Interactive reports in R with knitr and RStudio
![]() |
| Screen shot of RStudio with a knitr file (*.Rmd) in the top left window. Notice also the integrated knitr button. |
Here is a simple example. The knitr source code is available on Github.









