2015-11-19 46 views
0

我創建了一個slidify與rCharts和我的電腦上的瀏覽器工作正常後不會呈現在瀏覽器rCharts,但是當我打開另一臺計算機上的文件夾中,rCharts不會出現。代碼:Slidify發佈在GitHub上或RPubs

setwd("/home/sergio/Copy/PhDgrive/Conferences/IEA2015/IEA2015/") 
require(devtools) 
pkgs = c('slidify', 'slidifyLibraries') 
install_github(pkgs, 'ramnathv') 
install_github('rCharts', 'ramnathv') 
install.packages("base64enc") 
library(slidify) 
library(rCharts) 
library(base64enc) 
author("IEA2015") 
slidify("index.Rmd") 
publish(user = "xhie", repo = "IEA2015") 

此外,在github發佈項目後,RawGit不渲染和index.md dosent顯示rCharts都不是。 Here is index.Rmd

--- 
title  : High resolution emissions inventory for Megacity of São Paulo 
subtitle : MetroHealth - Instituo de Estudos Avançados USP 
author  : Sergio Ibarra Espinosa 
job   : PhD student Meteorology IAG/USP 
framework : io2012  # {io2012, html5slides, shower, dzslides, ...} 
highlighter : highlight.js # {highlight.js, prettify, highlight} 
hitheme  : io2012  # 
widgets  : [nvd3]    # {mathjax, quiz, bootstrap} 
ext_widgets : {rCharts: libraries/nvd3} 
mode  : selfcontained ,standalone#, draft 
knit  : slidify::knit2slides 
--- 

,這裏是什麼我不rChart

--- .class1 
## Passenger Cars distribution by age 
### Proconve Standard - 14 years average age 
```{r, results = 'asis', comment = NA, message = F, echo = F} 
require(knitr) 
require(rCharts) 
require(base64enc) 
setwd("/home/sergio/Copy/PhDgrive/Conferences/IEA2015/IEA2015/") 
emi <- read.csv("assets/files/dfsA_PROCONVE.txt") 
d1 <- dPlot(
    x = "sanos", 
    y = "df_A.sA", 
    groups = "Standard_PC", 
    data = emi, 
    type = 'bar') 
d1$legend(x = 60, y = 10, width = 800, height = 20, horizontalAlign = "left", orderRule = "Ancestry") 
d1$show('iframesrc', cdn = FALSE) 
``` 

我想看到的結果作爲圖像顯示在其他計算機上 enter image description here

回購的代碼示例是here和rPubs的鏈接是here 謝謝!

回答

0

您的圖形I幀指的是當地圖書館渲染:

<script src="/home/sergio/R/x86_64-pc-linux-gnu-library/3.2/rCharts/libraries/dimple/js/d3.v3.js" type="text/javascript"></script> 
<script src="/home/sergio/R/x86_64-pc-linux-gnu-library/3.2/rCharts/libraries/dimple/js/dimple.v2.1.0.js" type="text/javascript"></script> 

所以,沒有劇本,沒有呈現!

+0

嘛,所以,有沒有辦法改變它?如何;謝謝 – xhie

+0

你已經有了'libraries/widgets/nvd3/js/d3.v3.min.js',你只需在你的庫文件夾中複製酒窩並從這裏加載它。 –