我正在尝试开始使用 R 的plotly,但我遇到了有关用户名的错误。当我尝试执行以下代码时...
test=ggplot(diamonds,aes(x=diamonds$carat,y=diamonds$price))+geom_point()
test2=plotly(test)
plotly(test)
...我收到错误消息:
Storing 'username' as the environment variable 'plotly_username'
Error in Sys.setenv(plotly_username = username) :
wrong length for argument
我认为plotly的R包可以通过htmlwidgets在没有用户名的情况下使用。据我所知,我正在使用最新版本的plotly、ggplot 和htmlwidgets。我究竟做错了什么?
最佳答案
您必须使用ggplotly()
所以,
test <- ggplot(diamonds,aes(x = carat,y = price))+ geom_point()
ggplotly(test)
关于r - 离线使用plotly r包时有关用户名的错误消息,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/42866128/