R/unpivotRp.R

unpivotRp <- function(qr,nvars){
  rank <- qr$rank
  Rp <- matrix(0, rank, nvars)
  if (rank > 0L) {
    R <- qr.R(qr)
    pivot <- qr$pivot
    Rp[,pivot] <- R[seq_len(rank),]
  }
  return(Rp)
}

Try the mbest package in your browser

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

mbest documentation built on May 2, 2019, 2:14 p.m.