Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Attempt to apply non-function when showing Rickshaw graph? #204

Open
tcash21 opened this issue Aug 14, 2013 · 6 comments
Open

Attempt to apply non-function when showing Rickshaw graph? #204

tcash21 opened this issue Aug 14, 2013 · 6 comments
Labels

Comments

@tcash21
Copy link

tcash21 commented Aug 14, 2013

runGist("https://gist.github.com/tcash21/6234591")

As soon as I switched from renderPrint() and showing text to renderChart2() and showing a chart, I receive an 'attempt to apply non-function' error on startup. Any ideas how I can get rid of that error?

@ramnathv
Copy link
Owner

I am unable to reproduce the error, and the chart shows up fine for me. I have been making frequent changes to rCharts, so can you try installing the dev branch from github and trying again to see if the error persists?

image

@tcash21
Copy link
Author

tcash21 commented Aug 14, 2013

Just installed the dev branch and ran the gist again and I am able to produce the plots fine. However, in the console I see "Listening on port 8100
Error in eval(expr, envir, enclos) : attempt to apply non-function"

@timelyportfolio
Copy link
Contributor

I think that is a shiny issue. Try to install the newest shiny with the rstudio CRAN.

Kent

On Aug 14, 2013, at 5:08 PM, tcash21 notifications@github.com wrote:

Just installed the dev branch and ran the gist again and I am able to produce the plots fine. However, in the console I see "Listening on port 8100
Error in eval(expr, envir, enclos) : attempt to apply non-function"


Reply to this email directly or view it on GitHub.

@stanstrup
Copy link

I am having the same issue. Was any cause found? I get the error when the inputs (two selectInput) have not yet been set.
This happens even if I catch the missing input and doing "return(NULL)" inside renderChart2. Could it be that showOutput doesn't like to be feed NULL?

btw this is not Rickshaw specific. I am using highcharts.

@stanstrup
Copy link

Ok I have confirmed the nature of the bug. If Instead of return NULL I do:

if(is.null(input$explore_sys2)) {p<-hPlot(y ~ x, data = data.frame(x=1,y=2), type = "scatter");return(p)}

The error disappears. So showOutput doesn't handle NULL like uiOutput.
Can this be fixed or is there something else we can return to not display an output?

EDIT: Highcharts$new() can be returned instead of NULL.

@sachinrawat1903
Copy link

I am getting the same error.
and yes it's because i am returning null if the is input is null.
renderchart() function can't handle it.
Is there any solution available?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

5 participants