force_matrix: Function: force_matrix

Description Usage Arguments Value Examples

Description

The inner logic of truth table algorithms is composed of a logical matrix. I observe that R implicitely converts 1 dimensional matrixes to vectors, etc. This is not the behavior I want because I need to be able to work with the matrix independently of its size. This function forces the creation of a matrix, even if it is 1-by-1, 1-by-x or x-by-1.

Usage

1
force_matrix(m = NULL, vector_direction = NULL, ...)

Arguments

m

A (perhaps already implicitely converted) logical matrix (logical matrix, vector or atomic logical value).

vector_direction

VECTOR_DIRECTION_HORIZONTAL or VECTOR_DIRECTION_VERTICAL, depending on how we want vectors to be interpreted.

Value

A strict matrix type of any size.

Examples

1

daviddoret/haricot documentation built on May 21, 2019, 1:42 a.m.