Description Usage Arguments Details Value Author(s) Examples
View source: R/GraphAlignment.R
Convert a vector of real numbers to a vector of integer bin numbers according to the specified lookup vector.
1 | VectorToBin(v, lookup, clamp=TRUE)
|
v |
input vector |
lookup |
lookup vector |
clamp |
clamp values to lookup range |
This function transforms a vector of arbitrary values into a vector of bin numbers corresponding to the data in the input vector. Bin numbers are found using the specified lookup table (see GetBinNumber).
The return value is a vector containing the bin numbers for the elements of the input vector.
Joern P. Meier, Michal Kolar, Ville Mustonen, Michael Laessig, and Johannes Berg
1 2 3 | x <- rnorm(10)
lookup <- 0.2*(-5:5)
VectorToBin(x, lookup)
|
[1] 8 10 7 10 9 1 4 9 5 3
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.