R/get.counts.R

get.counts <-
function( x, state.num){

count.mat<-matrix(0, nrow=state.num, ncol=state.num)

   row.len<-length(x)

   for(i in 2:row.len){

      count.mat[x[i-1], x[i]] <- count.mat[x[i-1], x[i]] + 1

   }
return(count.mat)
}

Try the IBDhaploRtools package in your browser

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

IBDhaploRtools documentation built on May 2, 2019, 6:48 p.m.