# NOT RUN {
## Create an interactive hive plot in a temporal directory of your local machine
## Live examples on https://rjsplot.usal.es
if(interactive()){
# Prepare data
x <- 1-cor(t(mtcars))
source <- rep(rownames(x),nrow(x))
target <- rep(rownames(x),rep(ncol(x),nrow(x)))
links <- data.frame(source=source,target=target,value=as.vector(x))
# Generate the hive plot
hiveplot_rjs(links, mtcars, group = "cyl", size = "wt", color = "carb")
}
# }
Run the code above in your browser using DataLab