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

cant use ggplotly #3

Closed
bblarsen opened this issue Mar 12, 2014 · 9 comments
Closed

cant use ggplotly #3

bblarsen opened this issue Mar 12, 2014 · 9 comments

Comments

@bblarsen
Copy link

Hi I have been trying to get the ggplotly function to work with plotly. I have tried some of my own ggplot functions as well as the example given by the developers. Every time I get "Error: attempt to apply non-function"

@karthik
Copy link
Contributor

karthik commented Mar 12, 2014

Can you give us some example code to reproduce the problem?

@bblarsen
Copy link
Author

library(plotly)
Loading required package: RCurl
Loading required package: bitops
Loading required package: RJSONIO
Warning messages:
1: package ‘RCurl’ was built under R version 3.0.2
2: package ‘RJSONIO’ was built under R version 3.0.2
library(ggplot2)
ggiris <- qplot(Sepal.Length, Petal.Width, data=iris, color=Species)
ggiris #plot works fine when i dont use with plotly
py <- plotly(username="blarsen", key="removedforgithub")
ggiris <- qplot(Sepal.Length, Petal.Width, data=iris, color=Species)
py$ggplotly(gg)
Error: attempt to apply non-function

@sckott
Copy link
Contributor

sckott commented Mar 12, 2014

Hi @bblarsen

I think you were calling the object gg instead of ggiris which may have caused the problem. This works for me

library(plotly)
library(ggplot2)
ggiris <- qplot(Sepal.Length, Petal.Width, data=iris, color=Species)
ggiris
py <- plotly(<credentials>)
py$ggplotly(ggiris)

Gives https://plot.ly/~sckott/17/

@bblarsen
Copy link
Author

still getting an error

py <- plotly()
ggiris <- qplot(Sepal.Length, Petal.Width, data=iris, color=Species)
py$ggplotly(ggiris)

Error: attempt to apply non-function

@sckott
Copy link
Contributor

sckott commented Mar 12, 2014

Did you install the latest version of this package?

@bblarsen
Copy link
Author

got it, thanks! i had installed it 3 days ago, didnt realize it had changed.
-brendan

@sckott
Copy link
Contributor

sckott commented Mar 12, 2014

So it works now?

@bblarsen
Copy link
Author

yep!

@sckott
Copy link
Contributor

sckott commented Mar 12, 2014

Great!, closing then

@sckott sckott closed this as completed Mar 12, 2014
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants