0

Looking for some help identifying why this code would not render the Sankey in RStudio viewer or otherwise. I think it could be a problem with my R version (3.3.1)...the packages I'm using were built under 3.3.1. Unfortunately my organization takes awhile to update the enterpirse...

library(devtools)
library(rjson)
library(igraph)
library(rCharts)

x = read.csv('./R/dataforR.csv', header=TRUE)

colnames(x) <- c("UID","From", "To", "Avg.Hours")

sankeyPlot <- rCharts$new()

sankeyPlot$set(
data = x,
nodeWidth = 115,
nodePadding = 110,
layout = 132,
width = 1500,
height = 1300,
units = "hrs",
title = "New Sankey"
)
sankeyPlot$setLib('http://timelyportfolio.github.io/rCharts_d3_sankey')

sankeyPlot
FNULNU
  • 13
  • 2
  • I receive no errors, just a blank space in viewer – FNULNU Nov 17 '16 at 17:22
  • Welcome to SO. You could improve your question. I receive `Error ... cannot open file './R/dataforR.csv': No such file or directory`. Please read [how to provide minimal reproducible examples in R](http://stackoverflow.com/questions/5963269/how-to-make-a-great-r-reproducible-example#answer-5963610). Then edit & improve the question accordingly. A good post usually provides minimal input data, the desired output data & code tries - all copy-paste-run'able in a new/clean R session. – lukeA Nov 17 '16 at 21:25

1 Answers1

0

The address in sankeyPlot$setLib('http://timelyportfolio.github.io/rCharts_d3_sankey') is incorrect.

As per this SO question, it should be:

sankeyPlot$setLib('http://timelyportfolio.github.io/rCharts_d3_sankey/libraries/widgets/d3_sankey')

Jake Kaupp
  • 7,892
  • 2
  • 26
  • 36