Display googleVis charts within RStudio
[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.
The preview version 0.98.441 of RStudio introduced a new viewer pane to render local web content and with that it allows me to display googleVis charts within RStudio rather than in a separate browser window. Want to share your content on R-bloggers? click here if you have a blog, or here if you don't.
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
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.