set_neighbors | R Documentation |
Set neighbors for idx-th observation, idx starts from 1
set_neighbors(gda_w, idx, nbrs)
gda_w |
A Weight object |
idx |
A value indicates idx-th observation, idx start from 1 |
nbrs |
A list indicates the neighbors of idx-th observation (id start from 1) |
## Not run:
new_w <- create_weights(10)
set_neighbors(new_w, 1, c(2,3))
update_weights(new_w)
## End(Not run)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.