fbreitwieser / sankeyD3

D3 Sankey Network Graphs from R
65 stars 27 forks source link

saveNetwork not found #15

Closed hbnordin2 closed 6 years ago

hbnordin2 commented 6 years ago
## Run it locally
library(sankeyD3)
# Based on http://bost.ocks.org/mike/sankey/
# Load energy projection data
URL <- paste0("https://cdn.rawgit.com/christophergandrud/networkD3/",
              "master/JSONdata/energy.json")
Energy <- jsonlite::fromJSON(URL)

# Plot
sankeyNetwork(Links = Energy$links, Nodes = Energy$nodes, Source = "source",
             Target = "target", Value = "value", NodeID = "name",
             units = "TWh", fontSize = 12, nodeWidth = 30) %>% saveNetwork("test")

Outputs:

Error in saveNetwork(., "test") : could not find function "saveNetwork"
fbreitwieser commented 6 years ago

Thank, fixed