I'm trying to begin using plotly for R, but I'm having trouble with an error about username. When I try to execute the following code...
test=ggplot(diamonds,aes(x=diamonds$carat,y=diamonds$price))+geom_point()
test2=plotly(test)
plotly(test)
...I get the error message:
Storing 'username' as the environment variable 'plotly_username'
Error in Sys.setenv(plotly_username = username) :
wrong length for argument
I thought plotly's R package was available for use without a username via htmlwidgets. As far as I can tell, I'm using the latest version of plotly, ggplot, and htmlwidgets. What am I doing wrong?
You have to use ggplotly()
So,
test <- ggplot(diamonds,aes(x = carat,y = price))+ geom_point()
ggplotly(test)
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With