Re: [shinyapps-users] App runs locally but not on shinyapps.io "Error: (list) object cannot be coerced to type 'double'"

28 views
Skip to first unread message

Chad Barraford

unread,
Oct 20, 2014, 3:15:00 PM10/20/14
to NBATrends, shinyap...@googlegroups.com
@NBAtrends, when i load the app, everything appears to load ok. Are you still having the issue?


On Sun, Oct 19, 2014 at 5:14 AM, NBATrends <raadkh...@gmail.com> wrote:

Dear ShinyApps Users,

I am having trouble getting my app onto shinyapps.io. The app performs portfolio optimization and plots the efficient frontier and some of the packages it uses are stockPortfolio, quantmod, and quadprog. 
 
I have had success uploading other applications to the site, however, with my current app I keep getting the following error:

Error: (list) object cannot be coerced to type 'double'

I am not sure how to identify the problem, as when I run the app locally with runApp(), everything runs smoothly. You can see the error here: https://econ-r.shinyapps.io/Efficient_Frontier/

Has anybody encountered this error message before, and is there any reason why my app would be able to run locally but not on shinyapps.io?

Thank you for any input,
RK



--
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/bafd3292-ea40-4031-88c3-0176e99a603c%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

NBATrends

unread,
Oct 20, 2014, 3:57:44 PM10/20/14
to shinyap...@googlegroups.com, raadkh...@gmail.com
Hi Chad,

I was able to identify the issue with showApps() and get the app online. However, it does raise a question: why was the app running fine locally but not on shinyapps.io?

The error occurred because I was trying to find the maximum of a vector. When uploading to shinyapps.io, this number was no longer unique. In addition, I have noticed that the results on shinyapps.io vs when I run locally are slightly different. 

Both problems are most likely a result of rounding. Is there a reason for this and what are possible solutions?

Chad Barraford

unread,
Oct 20, 2014, 4:52:37 PM10/20/14
to NBATrends, shinyap...@googlegroups.com
There are a lot of reasons why an app may execute differently on shinyapps.io vs your personal workstation. A few off the top of my head are loaded libraries, character encoding, system dependencies, operating system differences, memory/cpu/network differences, etc. While we try to replicate your environment as close as possible, there will always be differences in the environment between your workstation and our servers.

Hope that helps. 

--
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.

NBATrends

unread,
Oct 20, 2014, 8:34:00 PM10/20/14
to shinyap...@googlegroups.com, raadkh...@gmail.com
Thank you for clarifying this Chad, I was perplexed by the differences. Also, thank you for your contribution to shinyapps, this service is extraordinary.
 

Chad Barraford

unread,
Oct 21, 2014, 9:42:11 AM10/21/14
to NBATrends, shinyap...@googlegroups.com
You're welcome.

On Mon, Oct 20, 2014 at 8:34 PM, NBATrends <raadkh...@gmail.com> wrote:
Thank you for clarifying this Chad, I was perplexed by the differences. Also, thank you for your contribution to shinyapps, this service is extraordinary.
 

--
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.
Reply all
Reply to author
Forward
0 new messages