R/freq_data.R

Defines functions freq_data

Documented in freq_data

freq_data <-
function(R){

  n = nrow(R)
  J = ncol(R)
  ss = 2^((J-1):0)
  ind = R%*%ss+1
  Y = matrix(0,n,2^J)
  Y[cbind(1:n,ind)] = 1
  return(Y)
  
}

Try the LCCR package in your browser

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

LCCR documentation built on Dec. 11, 2021, 9:30 a.m.