R中的NVD3似乎不起作用

时间:2014-03-22 13:02:11

标签: r d3.js rcharts

我正在尝试将NVD3集成到Rmd文件中。当我从webpage运行示例代码时,在R终端中没有任何反应:

hair_eye_male <- subset(as.data.frame(HairEyeColor), Sex == "Male")
n1 <- nPlot(Freq ~ Hair, group = "Eye", data = hair_eye_male, type = "multiBarChart")
n1$print("chart3")  # prints out code
n1  # nothing happens

其他示例在终端和降价中都有效,因此可行:

```{r, cache=FALSE,results='asis'}
require(rCharts)
map3 <- Leaflet$new()
map3$setView(c(51.505, -0.09), zoom = 13)
map3$marker(c(51.5, -0.09), bindPopup = "<p> Hi. I am a popup </p>")
map3$marker(c(51.495, -0.083), bindPopup = "<p> Hi. I am another popup </p>")
# map3  # works, but truncates bottom part of frame in e.g. dimple.js
map3$show("inline", include_assets = TRUE, cdn = TRUE)

如何让NVD3在R中工作? [RStudio 0.98.501,R 3.0.3,Xubuntu 13.10]。

0 个答案:

没有答案