Learn R Programming

rob (version 0.1.0)

adcol: Function to add a new column to the matrix

Description

Function to add a new column to the matrix

Usage

adcol(x, y, z, run)

Value

matrix with the new run order

Arguments

x

levels vector of the new factor

y

number of levels of the new factor

z

level vector of the initial matrix

run

initial run matrix

Examples

Run this code
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