Free Access Week - Data Engineering + BI
Data Engineering and BI courses are free this week!
Free Access Week - Jun 2-8

sdef (version 1.7)

designMatrix: Internal function

Description

This is an internal function. The user should not use the function directly.

Usage

designMatrix(lists)

Arguments

lists

The number of lists to be compared

Examples

Run this code
# NOT RUN {
## The function is currently defined as
function(lists){
rows = 2^(lists)
ncycles = rows
x = matrix(0,rows,lists)
for (k in 1:lists){   
settings = c(0,1)   
ncycles = ncycles/2   
nreps = rows/(2*ncycles)   
settings = matrix(rep(settings,nreps),nreps,
length(settings),byrow=TRUE)
settings = as.vector(settings)
#impila in un vettore settings, una colonna sotto l'altra
settings = matrix(rep(settings,ncycles),
length(settings),ncycles)
x[,lists-k+1] = as.vector(settings)
  }
return(x)
  }
# }

Run the code above in your browser using DataLab