Error of self edges in hive plot

Viewed 519

Absolutely cannot figure out why the error is coming even though there are no self edges.
Below is a reproducible code. Any help would be great

library(HiveR)


nodes = data.frame(id = 1:9, lab = c("A","B","C","E","F","G","H","I","J"), 
axis = c(1,1,1,2,3,2,2,2,3), radius = rep(50,9),size = rep(10,9),
color = c("yellow","yellow","yellow", "green","red","green","green","green","red"))

edges = data.frame(id1 = c(1,2,3,4,5,4,1,9,8,6,1),id2 = c(2,3,4,1,9,9,9,8,7,7,6), 
weight = rep(1,11),
color = c(rep("green",7), rep("red",4)))
        test3 <- ranHiveData(nx = 3)
        test3$nodes = nodes
        test3$edges = edges
        test3$edges$color <- as.character(test3$edges$color)
        test3$edges$id1 <- as.integer(test3$edges$id1)
        test3$edges$id2 <- as.integer(test3$edges$id2)
        test3$nodes$color <- as.character(test3$nodes$color)
        test3$nodes$lab <- as.character(test3$nodes$lab)
        test3$nodes$axis = as.integer(test3$nodes$axis)
        test3$nodes$id = as.integer(test3$nodes$id)
        test3$nodes$radius = as.numeric(test3$nodes$radius)
        test3$nodes$size = as.numeric(test3$nodes$size)
        test3$edges$weight = as.numeric(test3$edges$weight)
        test3$desc = "3 axes --9 nodes -- 11 edges"
        sumHPD(test3, chk.sm.pt = TRUE)

The code is giving self edges and the the plot is not rendering plotHive(test3) showing

Error in calcCurveGrob(x,x$debug) : end points must not be identical

1 Answers
Related