powered by
Function to add a new column to the matrix
adcol(x, y, z, run)
matrix with the new run order
levels vector of the new factor
number of levels of the new factor
level vector of the initial matrix
initial run matrix
x = matrix(c(-1, 1), ncol = 1) y = length(x) z = c(2,2,2) run=matrix(c(1,-1,1,-1,1,1,-1,-1), ncol=2) adcol(x,y,z,run)
Run the code above in your browser using DataLab