John
John

Reputation: 1947

Problem with saving kable table (install_phantomjs)

Let's consider very simple table created by kable

library(knitr)
library(kableExtra)

x <- data.frame(1:3, 2:4, 3:5)
x <- kable(x, format = "pipe", col.names = c("X_1", "X_2", "X_3"), caption = "My_table") 

I want to save this table into .pdf format

x %>% save_kable("My_table.pdf")

But I get error:

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.

However, when trying to install it by proposed command:

webshot::install_phantomjs()

I get error:

Error in utils::download.file(url, method = method, ...) : 
  cannot open URL 'https://github.com/wch/webshot/releases/download/v0.3.1/phantomjs-2.1.1-windows.zip'

So my question is - Is there any possbility to save kable table without using phanomjs?

Upvotes: 3

Views: 926

Answers (1)

csgillespie
csgillespie

Reputation: 60462

The command works for me and the URL is also available.

I suspect that the file (it's a .zip file) is being blocked by your firewall or anti-virus software.

Upvotes: 1

Related Questions