r - Embed javascript in Xaringan presentation


I have an interactive pooling question created using polleverywhere that would like to insert into my Xaringan rmarkdown presentation:

<script src="https://www.polleverywhere.com/multiple_choice_polls/U43TXrlame7hw6J/web.js?height=250&results_count_format=percent&width=300"></script>

What is the right approach to achieve that?

1 Answer: 

You need the <iframe> code instead. Go to your poll at polleverywhere then click on "3. Present" > Share > Embed poll. There will be a place that says "Copy and paste this snippet into your web page or blog". Copy a code that would look like:

<iframe src="https://embed.polleverywhere.com/multiple_choice_polls/XXX" width="100%" height="100%" frameBorder="0"></iframe>

and enter this to your slide. Just a note that open your html output in a browser like Chrome and not the Viewer pane in RStudio because the latter doesn't show it.

Alternatively if you want people to answer the question without leaving the presentation slide you can embed it as

<iframe src="https://PollEv.com/multiple_choice_polls/XXX/web" width="100%" height="100%" frameBorder="0"></iframe>

replacing src url from "Shareable response link". It works from Chrome but Firefox seems to squish a bit. Users have to identify who they are first though.


More Articles

r - Line by line analysis and plotting on multiple monitors during presentation

I am preparing a presentation on data analysis and I am provided with a 2-3 monitor and projector head-up. I would like to use one monitor(+projector) for code, one monitor(+projector) for console display and one monitor(+projector) for plots. Monitors are for me, projectors for the audience. I woul

How to run a Video Presentation on Android in loop?

I have a group of Android Tablets and I need them to only run a Video Presentation as Company Gift Card.The idea of this project is the same of usually Company's Gift PENs, where the Company give to their presentation audience the information in the PEN, but this case we will have on an Android Tabl

r - select certain elements to build incrementally ioslides

I'm building a presentation using ioslides in RStudio. I have a following slide:```{r, echo=FALSE}logo<-"logo.jpg"```## Playing with R<IMG style="position:absolute;top:5.5%;right:5%;width:140px;"SRC="`r logo`">Type in the interactive console:```{r, eval=FALSE}x <- 1:10 # "name <- valu

android - MediaRouter connect second time

I am using Android's MediaRouter / Presentation API (the support.v7 version).Everything works fine so far. The only thing that doesn't is:When I quit my activity (e.g.teardown & remove the callbacks), everything still works fine. However, when starting this activity (the previous mediarouter-act

r - Start with highlight mode enabled in ioslides

In ioslides presentation with Rmarkdown, there is an option to enable highlight mode in each slide by pressing h. Is there some way to make the highlight mode enabled by default and disable it by pressing h.

r - How to Make RStudio Presentation Self-contained?

I'm writing a presentation in R using RStudio. To create new presentation, I select "R Presentation" from the File => New File menu. RStudio creates new document. Here is the template:New Presentation========================================================author: date: First Slide===================

ios - Error: Attempt to present <UIImagePickerController: on <ViewController: while a presentation is in progress

Hey everyone and thank you for reading. I am making an app which you can take pictures and retreive pictures from the camera roll and display it on a view. The problem is that when I try to use the button which brings up the camera roll, I get the error "presentation is in progress" as above in the

git - replaying code for a hands on code presentation

So I need to conduct a workshop where I will be coding live on stage to build a demo app while the audience may follow.First problem is my typing speed is slow and secondly we have a fixed time span in which to complete the presentation.I have seen some youtube videos where presenters will use some

javascript - Make programmatically presentation

I would like to know if there is a way to create presentation (other than prezi's or powerpoint's) programmatically ?I mean maybe a library or something exists in a specific language (html/css or javascript would be great) ?Thanks for the answer :)

ipad - programmatically generate ppt in iOS

For generating PDF files we can use Core Graphics. Similarly is there any framework / class that can be used for generating .ppt (power point presentation) files via code ? Or is there any third party framework for this purpose.