Description Usage Arguments Value Author(s) References Examples
View source: R/add_positions_nodes.R
Aggregate positions to the nodes into mclean output
1 | add_positions_nodes(network, data, labels = "nodes", x = "x", y = "y")
|
network |
list; output from |
data |
matrix or data frame with postitions to add into the |
labels |
character string specifying the lables of each data element. |
x |
character string specifying the x position of each data element. |
y |
character string specifying the y position of each data element. |
It adds two new columns x
and y
in the node
object.
Daniel Alcaide, daniel.alcaide@esat.kuleuven.be
Alcaide D, Aerts J. (2018) MCLEAN: Multilevel Clustering Exploration As Network. PeerJ Computer Science 4:e145 https://doi.org/10.7717/peerj-cs.145
1 2 3 4 5 6 7 8 | data("synthetic_distances")
require(Rtsne)
tsne <- Rtsne(synthetic_distances, dims = 2, is_distance = TRUE, verbose=FALSE,
perplexity = (nrow(as.matrix(synthetic_distances))/3)-1)
tsne_output = cbind(rownames(as.matrix(synthetic_distances)), as.data.frame(tsne$Y));
colnames(tsne_output) = c("V1", "V2", "V3")
output = mclean(distance_matrix = synthetic_distances, threshold = 187, method = "single")
plot_network( add_positions_nodes(output, tsne_output, labels = "V1", x = "V2", y = "V3") )
|
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.