R/arrange_lambda.R

Defines functions arrange_lambda

Documented in arrange_lambda

arrange_lambda<- function(x)
{
  Dim <- dim( x )[1]
  Q   <- dim( x )[2]
  y   <- rep( 0, Dim*Q )
  index <- matrix(0, nrow = Dim*Q, ncol = 2)
  k <- 1
  for(i in 1:Dim)
  {
    for(j in 1:Q)
    {
      y[k] <- x[i, j]
      index[k, ] <- c(i, j)
      k <- k + 1
    }
  }
return( list(y = y, index = index) )
}

Try the mixbox package in your browser

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

mixbox documentation built on May 29, 2024, 3:58 a.m.