slidify / interactive

Interactive Documents with R
http://slidify.github.io/interactive
21 stars 61 forks source link

everything the same from repo, but no interactive slide #6

Open mkhalegh opened 9 years ago

mkhalegh commented 9 years ago

Dear Ramnath,

First, let me thank you for all the efforts you have put to maintain such great tools in Rstudio. I am becoming a big fan of slidify as I am passing "Developing Data Products" course on coursera.

However, I am running the exact example of interactive Interactive Chart with Controls from this repo. I did everything according to the descriptions. But, I can't see any interactive chart. I would be very thankful if you could give me some insight in this issue. I am struggling with interactive slides for a month and no luck in resolving it. I read all about interactive slides on forums and from your slidify website. But none helped me resolve these issues. I am now trying to reproduce the results from your repo. But,..

I get this error:

r Error in if (input[[paste0("runCode", i)]] != 0) return(isolate({ : argument is of length zero

my session info is:

R version 3.1.3 (2015-03-09)
Platform: x86_64-apple-darwin13.4.0 (64-bit)
Running under: OS X 10.10.2 (Yosemite)

locale:
[1] en_CA.UTF-8/en_CA.UTF-8/en_CA.UTF-8/C/en_CA.UTF-8/en_CA.UTF-8

attached base packages:
[1] stats     graphics  grDevices utils     datasets  methods   base     

other attached packages:
[1] rCharts_0.4.5          googleVis_0.5.8        XML_3.98-1.1           shiny_0.11.1           slidifyLibraries_0.3.1
[6] slidify_0.4.5         

loaded via a namespace (and not attached):
 [1] codetools_0.2-10 digest_0.6.8     evaluate_0.5.5   formatR_1.1      grid_3.1.3       htmltools_0.2.6  httpuv_1.3.2    
 [8] knitr_1.9        lattice_0.20-30  markdown_0.7.4   mime_0.3         plyr_1.8.1       R6_2.0.1         Rcpp_0.11.5     
[15] RJSONIO_1.3-0    rmarkdown_0.5.1  stringr_0.6.2    tools_3.1.3      whisker_0.3-2    xtable_1.7-4     yaml_2.1.13     

I use this YAML:


---
title       : Test deck
subtitle    : 
author      : Mona
job         : 
framework   : io2012        # {io2012, html5slides, shower, dzslides, ...}
highlighter : highlight.js  # {highlight.js, prettify, highlight}
hitheme     : tomorrow      # 
widgets     : [bootstrap, quiz, shiny, interactive]           # {mathjax, quiz, bootstrap}
mode        : selfcontained # {standalone, draft}
knit        : slidify::knit2slides

---

Here is my slide: --- .class #interactive

Interactive Chart with Controls

library(slidify)
library(slidifyLibraries)
require(shiny)
require(rCharts)
slidifyUI(
  sidebarPanel(
    selectInput('sex', 'Choose Sex', c('Male', 'Female')),
    selectInput('type', 'Choose Type',
      c('multiBarChart', 'multiBarHorizontalChart')
    )
  ),
  mainPanel(
    tags$div(id = 'nvd3plot', class='shiny-html-output nvd3 rChart')
  )
)

And here is my app1.R:

require(rCharts)
output$nvd3plot <- renderChart({
        haireye = as.data.frame(HairEyeColor)
        n1 <- nPlot(Freq ~ Hair, group = 'Eye', type = input$type,
                    data = subset(haireye, Sex == input$sex)
        )
        n1$set(dom = 'nvd3plot', width = 600)
        n1
})
ramnathv commented 9 years ago

@mkhalegh There have been so many changes in shiny and rmarkdown since I built this demo, that I am not surprised that it doesn't work any more. I will take a look at this to see if there is an easy fix. Thanks for bringing it to my attention.

mkhalegh commented 9 years ago

@ramnathv Thanks for taking this into your attention. I look forward to your suggestions.

kavetinaveen commented 7 years ago

Hi Ramnath,

Thanks a lot for such a great package.

I am also facing the same issue, not able to see interactive plots. Everything else working fine. Could you please guide me to resolve this.

Thank you, Naveen.