R/dist2full.R

dist2full <-
function(dis)
{
#### dis is a vector of distances between n points
### returns a symmetric matrix of size n x n
     n <- attr(dis, "Size")
     full <- matrix(0, n, n)
     full[lower.tri(full)] <- dis
     full + t(full)
}

Try the kineticF package in your browser

Any scripts or data that you put into this service are public.

kineticF documentation built on May 2, 2019, 2:45 p.m.