I wrote a program that needs to run, the following is my R code:
library(webshot)
webshot("tmp.html","Normal_top100.png", delay =10, vwidth = 1920, vheight=1080)
However, I got the following message:
PhantomJS not found. You can install it with webshot::install_phantomjs(). If it is installed, please make sure the phantomjs executable can be found via the PATH variable.
Therefore, I need to install Phantomjs, but I got some problem cannot be solved.
I saw the following link to install it, but I don't know why I still cannot run successfully.
https://www.jianshu.com/p/a7fd378714eb
The website said that you need to set Environment Variable and I used the method of this link. However, when I run this code again, I still got the same error. I suspected the reason is this website is incorrect.
Can anyone help me? Thanks.
For installing phantomJS you just need to run the following command in the R console:
webshot::install_phantomjs()
It will be downloaded and installed into your default library directory.
For more details please read the documentation: https://rdrr.io/cran/webshot/man/install_phantomjs.html
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With