View source: R/build_knn_graph.R
build_knn_graph | R Documentation |
Construct a binary adjacency matrix
build_knn_graph(coords, k)
coords |
An n x 2 data frame or matrix of 2d spot coordinates |
k |
The number of neighbors |
an adjacency matrix
data(coords_df_sim) coords_df <- coords_df_sim[,1:2] A <- build_knn_graph(coords_df,k = 4)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.