rcharts - Correct fashion of arguments -


my goal produce shiny app containing barchart parameters read selectinput. keep getting error: "error in eval(expr, envir, enclos) : object 'input' not found". tried, suggested ramnath : f = as.formaula(~ input$x) nothing worked. appreciated.

my code:

require(rcharts) require(shiny) aw<- read.table("g:\\research - lpvstw\\text files\\lpintw.txt", header = true, sep = "\t", fill = true) shinyserver(function(input, output) {    output$mychart <- renderchart2({     f = as.formula(~ input$x)      p1 <- nplot(f , group = "input$y" , data = aw, type = 'multibarchart')       p1$addparams(dom = 'mychart')     return(p1)   }) }) ################################# require(rcharts) require(shiny) aw<- read.table("g:\\research - lpvstw\\text files\\lpintw.txt", header = true, sep = "\t", fill = true) shinyui(pagewithsidebar(   headerpanel("rcharts: interactive charts r using polychart.js"),    sidebarpanel(     selectinput(inputid = "x",                 label = "choose x",                 choices = names(aw),                 selected = "secqof"),     selectinput(inputid = "y",                 label = "group by",                 choices = names(aw),                 selected = "gender")   ),   mainpanel(     showoutput("mychart", "nvd3")   ) )) 


Comments