ranHiveData(type = "2D", nx = 4, nn = nx * 15, ne = nx * 15, rad = 1:100,
ns = c(0.5, 1.0, 1.5), ew = 1:3, nc = brewer.pal(5, "Set1"),
ec = brewer.pal(5, "Set1"), axis.cols = brewer.pal(nx, "Set1"),
desc = NULL, allow.same = FALSE, verbose = FALSE)
c("2D", "3D")
.2 =< nx =< 6
).length(axis.cols) must = nx
.type = 2D
.TRUE
, the generation, processing and final result is reported to the console.HivePlotData
.sumHPD
).type = "2D"
, after the function creates an initial set of random nodes, these are randomly chosen and connected between adjacent axes, so that no edge crosses an axis.
For type = "3D"
, after the function creates an initial set of random nodes and edges, these are cleaned up by removing the following cases (which the rest of HiveR
is not intended to handle at this time): duplicated nodes, nodes that are not part of any edge, edges that begin and end on the same point, edges that begin and end on the same axis, and finally, for nx = 5 or 6
, edges that begin and end on colinear axes. Most of these don't cause an error, but produce some ugly results.
For the arguments rad, ns, ew, nc
and ec
, the values given are sampled randomly (with replacement) and assigned to particular nodes or edges.test4 <- ranHiveData(nx = 4)
str(test4)
sumHPD(test4)
Run the code above in your browser using DataLab