R/tritomat.R

Defines functions tritomat

Documented in tritomat

tritomat <-
function(dmat,n)
{ ## dmat : lower trangle elements
  ## n    : dimension of the square matrix
  ## value : matrix with diagonal zero filled and 
  ##       upper triangle mapped
  out <- matrix(0,n,n)
  out[lower.tri(out)] <- dmat
  out <- t(out)
  out[lower.tri(out)] <- dmat
  t(out)
}

Try the ltsk package in your browser

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

ltsk documentation built on Sept. 3, 2023, 1:06 a.m.