1
我遇到問題我想我可以解決我的問題,如果我可以在嘗試重新安裝之前卸載'ggplotly'。ggplotly將無法工作或重新安裝 - 有沒有一種方法來卸載它?
這裏發生了什麼:當我試圖在家裏當教練演示了它,這工作得很好
代碼失敗。這是R Markdown。逐行調查問題代碼單元,問題集中在ggplot2
(它使用ggplotly
)。代碼和錯誤消息在下面提供。在代碼「圖」是ggplot2 facet_wrap()
,應該通過ggplotly
。
這裏是我的問題的控制檯和一個失敗的嘗試通過重新安裝來修復它摘錄:
> ggplotly(graph)
Error in dev_fun(tmpPlotFile, width = deviceWidth, height = deviceHeight) :
unable to start png() device
> ggplotly(graph)
Error in RStudioGD() :
Shadow graphics device error: r error 4 (R code execution error)
In addition: Warning messages:
1: In grDevices:::png("C:/Users/User/AppData/Local/Temp/Rtmp0ar20f/3b613ba7d0ce4228bc937aee7cfcb112.png", :
unable to open file 'C:/Users/User/AppData/Local/Temp/Rtmp0ar20f/3b613ba7d0ce4228bc937aee7cfcb112.png' for writing
2: In grDevices:::png("C:/Users/User/AppData/Local/Temp/Rtmp0ar20f/3b613ba7d0ce4228bc937aee7cfcb112.png", :
opening device failed
> install.packages("plotly")
Error in install.packages : Updating loaded packages
Error in gzfile(file, mode) : cannot open the connection
In addition: Warning message:
In gzfile(file, mode) :
cannot open compressed file 'C:\Users\User\AppData\Local\Temp\Rtmp0ar20f/libloc_190_4464fd2b.rds', probable reason 'No such file or directory
您可以使用函數'remove.packages'刪除已安裝的軟件包 – tictocchoc
謝謝!那工作。很快就會在完整答案中發佈它。 – TMWP