Learn R Programming

ordinalTables (version 1.0.0.3)

log_linear_append_column: Appends a column to an existing design matrix.

Description

Takes the design matrix provided and appends the new column

Usage

log_linear_append_column(x, x_new, position = ncol(x) + 1)

Value

the new design matrix

Arguments

x

the original design matrix

x_new

the column to be appended

position

column index within the new matrix for the new column. Defaults to last position = appending the column

Examples

Run this code
x <- log_linear_main_effect_design(vision_data)
new_column <- c(1, 0, 0, 0,
                0, 1, 0, 0,
                0, 0, 1, 0,
                0, 0, 0, 1)
x_prime <- log_linear_append_column(x, new_column)

Run the code above in your browser using DataLab