sankeywheel {sankeywheel} | R Documentation |
Create Dependency Wheels and Sankey Diagrams
Description
@description By binding R functions and the 'Highcharts' http://www.highcharts.com/ charting library, 'sankeywheel' package provides a simple way to draw dependency wheels and sankey diagrams.
Usage
sankeywheel(from, to, weight, type = "dependencywheel", width = NULL,
height = NULL, seriesName = "demo series", theme = "sandsignika",
title = "Example Chart", titleAlign = "center", titleSize = "20px",
titleColor = "#333333", subtitle = "", subtitleAlign = "center",
subtitleSize = "", subtitleColor = "#666666", elementId = NULL,
...)
Arguments
from |
from verctor; |
to |
to vector; |
weight |
weight vector; |
type |
Charts type, dependencywheel or sankey; |
width |
chart width, for example, "100%"; |
height |
chart height, for example, "400px"; |
seriesName |
Series name, like "demo series"; |
theme |
chart theme, you can use these themes: darkgreen/darkblue/avocado/darkunica/gray/ gridlight/grid/sandsignika/sunset; |
title |
title; |
titleAlign |
title alignment, left/center/right; |
titleSize |
title size, like "20px"; |
titleColor |
title color, like "#333333"; |
subtitle |
subtitle; |
subtitleAlign |
subtitle alignment, left/center/right; |
subtitleSize |
subtitle size, like "16px"; |
subtitleColor |
subtitle color, like "#666666"; |
elementId |
NULL. |
... |
Additional parameters. |
Examples
library(sankeywheel)
if(interactive()){
sankeywheel(from = sankeydf$from,
to = sankeydf$to,
weight = sankeydf$weight,
type = "dependencywheel")
sankeywheel(from = sankeydf$from,
to = sankeydf$to,
weight = sankeydf$weight,
type = "sankey",
theme = "sunset")
}
[Package sankeywheel version 0.1.0 Index]