I am trying to reproduce a simple example using the rCharts library to plot a sankey graph. I found this example from scratch and tried to reproduce it, however I had some problems.
Firstly, I tried to run this code without anything. Then I found out and realized that I needed d3_sankey on my computer. So, I downloaded it from here and copied it to C:\Users\adomas\Documents\R\win-library\3.0\rCharts\libraries\widgets\d3_sankey .
Then I tried this immutable code again and still got the following error:
Error in file(con, "r") : cannot open the connection In addition: Warning message: In file(con, "r") : cannot open file '/config.yml': No such file or directory
Since this didn’t help either, I tried changing the paths: sankeyPlot$setLib('libraries/widgets/d3_sankey') sankeyPlot$setTemplate(script = "libraries/widgets/d3_sankey/layouts/chart.html")
to
sankeyPlot$setLib('C:/Users/adomas/Documents/R/win-library/3.0/rCharts/libraries/widgets/d3_sankey') sankeyPlot$setTemplate(script = "C:/Users/adomas/Documents/R/win-library/3.0/rCharts/libraries/widgets/d3_sankey/layouts/chart.html")
However, this time a blank screen appeared in Viewer, but there is no real Sankey graph, and I received the following in the console: Warning message: In readLines(file, warn = warn, ...) : invalid input found on input connection 'C:/Users/adomas/Documents/R/win-library/3.0/rCharts/libraries/widgets/d3_sankey/layouts/chart.html
I tried changing paths, etc., but still something was wrong. And I'm not sure if I need to use sankeyPlot$setTemplate at all. I want to use the Sankey diagram in my brilliant application, but first I want to reproduce it simply in R. Suggestions would help a lot!
Library Versions: rCharts_0.4.2 igraph_0.7.0 Version R: 3.0.2
Editorial: I tried this code on a different system. And everything works there. The versions of the libraries and R are the same, and I copied the same documents and just indicated the full path. I tried this again on my own computer, but still got the same error.