Knitr does not display googleVis

I am having problems with Rsutdio and knitr on Windows 7 to render a simple gvisTable. Here is my code

```{r results='asis'} require(googleVis) op <- options(gvis.plot.tag="chart") data(iris) t = gvisTable(data = iris) print(t) ``` 

and here is my mistake:

pandoc.exe: Failed to get https://www.google.com/jsapi?callback=displayChartTableID14c4345d7f3 FailedConnectionException2 "www.google.com" 443 True connect: failed (Connection timeout (WSAETIMEDOUT)) Erreur: pandoc document conversion failed with error 61

My Rstudio version: 0.98.1091 And my SessionInfo:

 R version 3.1.2 (2014-10-31) Platform: x86_64-w64-mingw32/x64 (64-bit) locale: [1] LC_COLLATE=French_France.1252 LC_CTYPE=French_France.1252 LC_MONETARY=French_France.1252 [4] LC_NUMERIC=C LC_TIME=French_France.1252 attached base packages: [1] stats graphics grDevices utils datasets methods base other attached packages: [1] plotrix_3.5-10 data.table_1.9.4 googleVis_0.5.6 knitr_1.8 loaded via a namespace (and not attached): [1] chron_2.3-45 digest_0.6.4 evaluate_0.5.5 formatR_1.0 htmltools_0.2.6 plyr_1.8.1 Rcpp_0.11.3 [8] reshape2_1.4 RJSONIO_1.3-0 rmarkdown_0.3.11 stringr_0.6.2 tools_3.1.2 yaml_2.1.13 

or this code works fine:

 ```{r results='asis'} require(knitr) data(iris) kable(iris) ``` 

Do you have any idea about the problem with googleVis in this context? Thanks in advance for any help.

+6
source share
1 answer

Pandoc is trying to load a googleVis diagram so that it can embed a static / offline copy in your document. You can work around the problem by telling Pandoc not to create a separate document (i.e. do not add resources to it, which causes the problem) - add this to the beginning of the document or just the text between --- if you already have a YAML header:

 --- output: html_document: self_contained: no --- 

Pandoc should not have problems retrieving resources over https. If you have time to reproduce the problem outside the rmarkdown workflow (i.e. On Vanilla Markdown โ†’ HTML conversion) and find that it is still a problem, please report the problem to Pandoc: https://github.com / jgm / pandoc / issues .

+6
source

Source: https://habr.com/ru/post/979650/


All Articles