Skip to content

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

Description

@mkhalegh

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
})

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions