R/lowerTriInd.r

Defines functions lowerTriInd

Documented in lowerTriInd

lowerTriInd <- function(p){

  i1  <- rep(0,p*(p-1)/2)
  i2  <- rep(0,p*(p-1)/2)
  count <- 1
  for (j in 1:(p-1))
  {
   for (i in (j+1):p){
     i1[count] <- j
     i2[count] <- i
     count <- count+1
   }
  }
 return(list(i1,i2))

}

Try the ldstatsHD package in your browser

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

ldstatsHD documentation built on Aug. 14, 2017, 5:06 p.m.