Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Error message about username when using plotly r package offline [closed]

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?

like image 977
user3786999 Avatar asked Mar 17 '17 19:03

user3786999


1 Answers

You have to use ggplotly()

So,

test <- ggplot(diamonds,aes(x = carat,y = price))+ geom_point()

ggplotly(test)

like image 131
conv3d Avatar answered Sep 20 '22 03:09

conv3d