如何在windows上为ggvis安装export_png()? (必须是一个解决方案)

时间:2016-08-18 22:47:26

标签: r node.js ggvis vega

在尝试安装export_png() ggvis 1234,{{{{}}时,人们遇到了类似的问题3}}。我通过node.js跟踪了vega的安装。

这是我的代码:

library(ggvis) 
mtcars %>% ggvis(~hp, ~mpg, fill=~factor(cyl)) %>% layer_smooths() %>% export_png()

这就是结果:

Writing to file plot.png
undefined:3
return x["data"]["domain"];
                ^

TypeError: Cannot read property 'domain' of undefined
    at eval [as get] (eval at <anonymous> (C:\Users\mglez\AppData\Roaming\npm\node_modules\vega\node_modules\datalib\src\util.js:147:20), <anonymous>:3:17)
    at eval [as add] (eval at create (C:\Users\mglez\AppData\Roaming\npm\node_modules\vega\node_modules\datalib\src\aggregate\measures.js:175:23), <anonymous>:3:14)
    at Facetor.proto._add (C:\Users\mglez\AppData\Roaming\npm\node_modules\vega\node_modules\datalib\src\aggregate\aggregator.js:158:31)
    at add (C:\Users\mglez\AppData\Roaming\npm\node_modules\vega\src\transforms\Aggregate.js:174:31)
    at Array.forEach (native)
    at Aggregate.prototype.transform (C:\Users\mglez\AppData\Roaming\npm\node_modules\vega\src\transforms\Aggregate.js:190:13)
    at Aggregate.prototype.evaluate (C:\Users\mglez\AppData\Roaming\npm\node_modules\vega\src\transforms\Transform.js:48:15)
    at Node.dataRef (C:\Users\mglez\AppData\Roaming\npm\node_modules\vega\src\scene\Scale.js:387:15)
    at Node.domainMinMax (C:\Users\mglez\AppData\Roaming\npm\node_modules\vega\src\scene\Scale.js:429:15)
    at Node.quantitative (C:\Users\mglez\AppData\Roaming\npm\node_modules\vega\src\scene\Scale.js:223:18)
Warning message:
running command '"C:\Users\mglez\AppData\Roaming\npm\vg2png.cmd" C:\Users\mglez\AppData\Local\Temp\RtmpSWJcGx\ggvis25e828cd4fe4/plot.json plot.png' had status 1 

这是我的会话信息

> sessionInfo()
R version 3.3.0 (2016-05-03)
Platform: x86_64-w64-mingw32/x64 (64-bit)
Running under: Windows >= 8 x64 (build 9200)

locale:
[1] LC_COLLATE=English_United States.1252  LC_CTYPE=English_United States.1252    LC_MONETARY=English_United States.1252 LC_NUMERIC=C                          
[5] LC_TIME=English_United States.1252    

attached base packages:
[1] stats     graphics  grDevices utils     datasets  methods   base     

other attached packages:
[1] ggvis_0.4.2

loaded via a namespace (and not attached):
 [1] Rcpp_0.12.5     XML_3.98-1.4    digest_0.6.9    dplyr_0.4.3     assertthat_0.1  mime_0.4        bitops_1.0-6    R6_2.1.2        jsonlite_0.9.22 xtable_1.8-2   
[11] DBI_0.4-1       magrittr_1.5    lazyeval_0.2.0  RJSONIO_1.3-0   tools_3.3.0     RSelenium_1.3.5 RCurl_1.95-4.8  shiny_0.13.2    httpuv_1.3.3    parallel_3.3.0 
[21] caTools_1.17.1  htmltools_0.3.5

任何帮助将不胜感激。

0 个答案:

没有答案