本文介绍了在GitHub或RPub上发布后,Slidify不会在浏览器中呈现rCharts的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我使用rCharts创建了滑动,并且在我的计算机的浏览器上正常工作,但是当我在另一台计算机上打开该文件夹时,rCharts未出现。代码:

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

另外,在和rPubs的链接是
谢谢!

解决方案

您的图形iframe引用本地库进行渲染:

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

所以,不需要脚本,不需要渲染!


I created a slidify with rCharts and works fine on the browser of my computer, but when I open the folder on another computer, the rCharts doesn't appear. Code:

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")

Also, after publishing the project on github, RawGit doesn't render and index.md dosent show rCharts neither. 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
---

and here is an example of what I'm not the code with 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)
```

I want to see the results as the image shows on other computers

The repo is here and the link for rPubs is hereThanks!

解决方案

Your graph iframes are referring to local libraries for rendering :

<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>

So, no script, no render !

这篇关于在GitHub或RPub上发布后,Slidify不会在浏览器中呈现rCharts的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持!

10-19 16:40