Description Usage Arguments Value Author(s) See Also Examples
Adds constant to the elements of a dist object vector-wise. The idea is that a
symmetrix matrix M
can be represented as a triangular object d
.
With this function you set M[x,x] = M[x,x] + k
but instead of working on
M
this function works on its dist
representation d
.
1 | addDist(d, x, k)
|
d |
a dist object, upper diagonal, representing a symmetric matrix |
x |
a list of vectors of indices |
k |
a vector of constants to add, arguments are eventually recycled silently |
returns the modified dist object
Stefano M. Iacus
1 2 3 4 5 6 7 8 9 10 11 12 13 |
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.