View source: R/plot_knnn_network.R
plot_knnn_network | R Documentation |
This function uses three.js javascript library (https://threejs.org/) (R package -> threejs: https://bwlewis.github.io/rthreejs) to draw the k-nnn. You can select the layout algorithm to arrange the network. Moreover, the network can visualize any kind of clustering (internal or external) an color the nodes by cluster. Finally the funtion return a list with the network, the layout and the colors (to use with other functions)
plot_knnn_network(net, layout = "fr", dim = 3, cluster, ...)
net |
An igraph object (preferably knnn result) |
layout |
String with the layout option c("fr","kk","DrL","mds")
|
dim |
Number of network dimensions (2 or 3). Default = 3. |
cluster |
Two column data.frame with the nodes (column 1) and the cluster or classification(column 2) |
... |
Passed to layout_with_ |
A list with the elements "graph", "layout" and "colors"
igraph
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.