R/getDummies.R

Defines functions getDummies

getDummies = function(n){
  result = matrix(0, ncol = n-1, nrow=n)
  result[2:n,] = diag(n-1)
  return(result)
}

Try the glm.predict package in your browser

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

glm.predict documentation built on Dec. 2, 2022, 5:12 p.m.