R/sym.P.R

"sym.P" <- function(x){
  alpha<-x[upper.tri(x)]
  x1<-t(x)
  beta<-x1[upper.tri(x1)]
  gamma<-(alpha+beta)/2
  x[upper.tri(x)]<-gamma
  x2<-t(x)
  x[lower.tri(x)]<-x2[lower.tri(x2)]
  x
}

Try the Biodem package in your browser

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

Biodem documentation built on Jan. 5, 2021, 5:08 p.m.