Невозможно использовать "webshot" с RStudio Cloud - PullRequest
1 голос
/ 03 апреля 2020

Каждый раз, когда я пытаюсь что-то построить с помощью RStudio Cloud с помощью пакета webshot, я получаю сообщение об ошибке. Пример:

#install webshot
library(webshot)
webshot::install_phantomjs()
# Make the graph
my_graph=wordcloud2(demoFreq, size=1.5)
# save it in html
library("htmlwidgets")
saveWidget(my_graph,"tmp.html",selfcontained = F)
# and in png
webshot("tmp.html","fig_1.png", delay =5, vwidth = 480, vheight=480)

Ошибка говорит:

QXcbConnection: Could not connect to display :0
PhantomJS has crashed. Please read the bug reporting guide at
<http://phantomjs.org/bug-reporting.html> and file a bug report.
Error in webshot("tmp.html", "fig_1.png", delay = 5, vwidth = 480, vheight = 480) : 
  webshot.js returned failure value: -6
...