wch / webshot

Take screenshots of web pages from R

Home Page:http://wch.github.io/webshot/

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

install_phantomjs dir on package path

wildintellect opened this issue · comments

The documentation for install_phantomjs() states

"If these directories are not writable, the directory ‘PhantomJS’ under the installation directory of the webshot package will be tried"

But looking at the code it does not actually try this directory.
This line in utils.R fails if PhantomJS folder doesn't already exist as system.file will return an empty character string.
path <- c(path, system.file('PhantomJS', package = 'webshot'))
Needs to be something like
path <- c(path, file.path(system.file(package = 'webshot'),'PhantomJS'))

Tested this on a Linux machine.

Please add installed-dir for webshot::install_phantomjs() in linux. @wch Thank you.