Error: need finite 'ylim' values

499 views
Skip to first unread message

rtre...@gmail.com

unread,
Jun 18, 2013, 3:12:30 PM6/18/13
to shiny-...@googlegroups.com
I try to make a simple graph with shiny but the code returns me  error mesage: "need finite 'ylim' values"
##################################my data
data.frame':	270 obs. of  3 variables:
 $ canton  : Factor w/ 28 levels "Appenzell Rhodes-Ext.",..: 1 2 3 5 6 4 7 8 9 10 ...
 $ variable: Date, format: "2003-06-18" "2003-06-18" "2003-06-18" "2003-06-18" ...
 $ value   : num  1.89 0 0.36 0.38 1.61 ...
##################################server code
shinyServer(function(input, output) {
  output$main_plot <- reactivePlot({
                      plot(input$dr)
                                   })
})
##################################ui
shinyUI(pageWithSidebar(
  headerPanel("test"),
  sidebarPanel(
    selectInput("dr", "donnees",
                list("Canton" = "canton", 
                     "Valeur" = "value", 
                     "Variable" = "variable"))
  ),
  
  mainPanel(plotOutput("main_plot"))
))
##############################
thank you 
ps as you can see my approach is minimalistic
raphael

Joe Cheng

unread,
Jun 18, 2013, 3:28:39 PM6/18/13
to shiny-...@googlegroups.com
list("Canton" = "canton", 
                     "Valeur" = "value", 
                     "Variable" = "variable")

This is just returning the strings "canton", "value", or "variable"; you need to change this to refer to your actual data (e.g. data$canton, data$value, data$variable).


--
You received this message because you are subscribed to the Google Groups "Shiny - Web Framework for R" group.
To unsubscribe from this group and stop receiving emails from it, send an email to shiny-discus...@googlegroups.com.
For more options, visit https://groups.google.com/groups/opt_out.
 
 

rtre...@gmail.com

unread,
Jun 18, 2013, 4:05:29 PM6/18/13
to shiny-...@googlegroups.com
dear joe
thank you for your quick reply but the problem remains the same. I still have the error message.

Joe Cheng

unread,
Jun 18, 2013, 4:56:13 PM6/18/13
to shiny-...@googlegroups.com
Oh, also reactivePlot should be changed to renderPlot.

Felix Dietrich

unread,
Mar 10, 2016, 10:10:22 AM3/10/16
to Shiny - Web Framework for R
Hi! Did you find an answer to this? I have a similar issue
Reply all
Reply to author
Forward
0 new messages