r - Include googleVis chart in ioslides RStudio


I have a following chart:

df = data.frame(models = c("PLAT", "LC", "APC", "CBD", "M6", "M7", "M8"), val = 1:7)
Column <- gvisColumnChart(df)

I would like to place it in ioslides in RStudio. Can anyone instruct me how to do it?

1 Answer: 

The key is to use options(gvis.plot.tag='chart') as part of your code, this instructs the plot() function to only output the html code for the chart. Here is the code:

## Another GoogleVis Slide

Some text in slide

```{r warning=FALSE, message=FALSE, results='asis', tidy=FALSE}

op <- options(gvis.plot.tag = 'chart')

df = data.frame(models = c("PLAT", "LC", "APC", "CBD", "M6", "M7", "M8"), val = 1:7)
Column <- gvisColumnChart(df)

You can find this by typing ?plot.gvis but I think it is not evident, so hopefully someone will save some time by reading this answer


More Articles

c# - XAML Layout- how to add a WebKitBrowser below buttons inside a <Grid>

I have the following XAML markup, which I am trying to use to display a WebKitBrowser below some buttons on the the GUI of my application:<DockPanel VerticalAlignment="Stretch" Height="Auto" HorizontalAlignment="Stretch" Width="Auto"> <Grid x:Name="browserGrid">

presentation - Replacing particular text in all sides of a ppt using python-pptx

I am new with python-pptx. But I am familiar with its basic working. I have searched a lot but I could not find a way to change a particular text by another text in all slides. That text may be in any text_frame of a slide. like all slides in a ppt have 'java' keyword, I want to change it by 'python

c# - Retrieving the image name from a powerpoint file

I need to retrieve the image file name from an image in a pptx file. I already got the stream from the image but i didn't got the name of the image file... Here is my code:private static Stream GetParagraphImage(DocumentFormat.OpenXml.Presentation.Picture picture, DocumentFormat.OpenXml.Packagin

output - Let User Re-type The Input Without Interfering With Other Strings (C#)

My input gets checked by "TryParse". And if it is false I want to let the user retype it correctly. But when I click any key after the check it deletes everything above cause of "Console.Clear();". - I want to delete only the input part and nothing above it.namespace Practice{ class Program {

c# - Error when execute storyboard to close a window open in showdialog

I have get back this error when the Storyboard close the window 'This Visual is not connected to a PresentationSource.'my scenario consist in two window and one UserControlthis is window1's xaml code:<Window x:Name="LWindow" x:Class="WpfAppXtesting.WindowTest1" xmlns="http://schemas.microsoft.

Using Android Presentation class with a Bluetooth mouse

I am attempting to use the Presentation class for Android to display a secondary app on another display which can be navigated with the mouse; however, when I connect a Bluetooth mouse to the phone it only shows the cursor and allows for click inputs on the phone's primary display. Is there a way to

Best iPhone/iOS framework for Presentation Apps

Which framework do you suggest for building an application to manage presentation, like an interactive and multimedia brochure?Do you think the iOS is enough?

android - Expression of time difference

Given a number of seconds/milliseconds, what is the best method to gracefully/cleanly express this time interval in the user's language, using the Android values/strings.xml API?I am not asking for how to get the days/hours/minutes -- answers for that can be found in how to show milliseconds in days

android - How to prevent AlertDialog using custom theme from appearing fullscreen?

I am using a custom style for my AlertDialogs, but it is making them appear fullscreen. I've searched around, but I could only seem to find people wanting to make it fullscreen... Here is my style <style name="MyDialog" parent="AlertDialog.AppCompat"> <item name="android:background">

objective c - iOS Project Structure for Presentation App

I'm gonna build presentation app, which will present a brandproduct.Presentation will have multiple slides (states) with commonbackground.In some slides I can go back to previous slideMy questions: 1. Do I have to use View Based Application? 2. For each state (slide) should I use separate UIViewCont