View source: R/rTEM_multimer_simulation.R
pick_neighbor | R Documentation |
Pick Neighbor
pick_neighbor(
ranks,
probs,
distances = NA,
sample_method = "rank",
exponent = 1,
group_size = 2
)
ranks |
ranks for each point. If based upon a weighted distance, then may not directly correspond to the 'distances'. |
probs |
vector of probabilities.
For |
distances |
distance to each point. Only used if sample_method = "exp" #' @param sample_method if equal to "rank", the probability of a point of rank x being chosen as a guest is probs[x]. If equal to "exp", the probability of a point of rank x being chosen as a guest is probs[x] * exp(-exponent * distances[ranks])) |
exponent |
a numeric. If sample_method = "exp", then this is the value of exponent in exp(-exponent * distances[ranks]) |
group_size |
a numeric. How large will the groups be. Pick 'group_size -1' neighbors |
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.