reactiveValues on shinyApps

55 views
Skip to first unread message

Josh Lindsteadt

unread,
Jun 13, 2014, 2:34:42 PM6/13/14
to shinyap...@googlegroups.com
Do reactiveValues behave differently on shinyApps vs on a local machine? I have a part of my app that increases the number of textInputs based on the number of times an actionButton is pressed. That number is a reactiveValue, and it works correctly when ran locally, but the textInputs disappear when it is clicked on my shinyApp.

Thanks!
Josh

Andy Kipp

unread,
Jun 13, 2014, 2:37:25 PM6/13/14
to Josh Lindsteadt, shinyap...@googlegroups.com
Josh,

What is the URL for your application?

Thanks

-Andy


--
You received this message because you are subscribed to the Google Groups "ShinyApps Users" group.
To unsubscribe from this group and stop receiving emails from it, send an email to shinyapps-use...@googlegroups.com.
To post to this group, send email to shinyap...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/shinyapps-users/aac9bcea-b21b-4b2d-acbe-8f8d4645157a%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

Josh Lindsteadt

unread,
Jun 13, 2014, 4:24:32 PM6/13/14
to shinyap...@googlegroups.com

Josh Lindsteadt

unread,
Jun 15, 2014, 10:05:53 PM6/15/14
to shinyap...@googlegroups.com
I did a little more troubleshooting, and think the issues has to do with the reactiveValuesToList(input) function.  On ShinyApps the following code produces the error "Results do not have equal lengths". 

      output$debug <- renderPrint(function(){
          x <- reactiveValuesToList(input)
          x <- ldply(x)
          x
     })

On Friday, June 13, 2014 3:24:32 PM UTC-5, Josh Lindsteadt wrote:
Paretoportfolio.shinyapps.io/portfoliobuilder

Josh Lindsteadt

unread,
Jun 16, 2014, 10:31:22 AM6/16/14
to shinyap...@googlegroups.com
I did some more troubleshooting, and I think the issue has to to with the reactiveValuesToList(input) function.  The following code on ShinyApps returns the error, "Results do not have equal lengths"

      output$debug <- renderPrint({

Fereshteh Karimeddini

unread,
Jun 17, 2014, 4:05:10 PM6/17/14
to shinyap...@googlegroups.com
Josh,

Do you mind sharing your application code so we can troubleshoot the problem?

Fereshteh

Joe Cheng

unread,
Jun 17, 2014, 4:09:31 PM6/17/14
to Fereshteh Karimeddini, shinyap...@googlegroups.com, Jeff Allen
Josh, I think I know what this is. If you add this to your app:

output$debuginfo <- renderPrint({
  str(reactiveValuesToList(input))
})

and a corresponding verbatimTextOutput("debuginfo") in ui.R, I think you'll find that when run on ShinyApps.io there are a couple of "hidden" inputs that are being sent along and included in your input object. So you'll either have to remove these values from x, or construct x explicitly by grabbing the pieces you want from input rather than converting the whole thing.


--
You received this message because you are subscribed to the Google Groups "ShinyApps Users" group.
To unsubscribe from this group and stop receiving emails from it, send an email to shinyapps-use...@googlegroups.com.
To post to this group, send email to shinyap...@googlegroups.com.

Josh Lindsteadt

unread,
Jun 18, 2014, 12:28:30 PM6/18/14
to shinyap...@googlegroups.com, fere...@rstudio.com, je...@rstudio.com
That was it.  I changed it to explicitly call each input, and now it is working.  Thanks again!
Reply all
Reply to author
Forward
0 new messages