脱机使用 plotly r 包时有关用户名的错误消息



我正在尝试开始对 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)

相关内容

最新更新