View source: R/nearest_neighbors.R
| make_cds_nn_index | R Documentation | 
Make a nearest neighbor index from the specified reduction_method matrix in the cell_data_set using either the default nearest neighbor method or the method specified in the nn_control list parameter, and store the index in the cell_data_set. This function returns a cell_data_set.
make_cds_nn_index(
  cds,
  reduction_method = c("UMAP", "PCA", "LSI", "Aligned", "tSNE"),
  nn_control = list(),
  verbose = FALSE
)
| cds | a cell_data_set with the reduced dimension matrix from which to make the nearest neighbor index and with which the index is stored. | 
| reduction_method | a string giving the reduced dimension matrix to use for making the nn_index nearest neighbor index. Note: distances in tSNE space reflect spatial differences poorly so using nearest neighbors with it may be meaningless. | 
| nn_control | a list of parameters to use for making the nearest neighbor index. See the set_nn_control help for details. | 
| verbose | a boolean indicating whether to emit verbose output. | 
a cell_data_set with the stored index.
  
    cds <- load_a549()
    cds <- preprocess_cds(cds)
    cds <- make_cds_nn_index(cds, 'PCA')
  
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.