Learn R Programming

editrules (version 2.0-3)

substValue: Replace a variable by a value in a set of edits.

Description

Replace a variable by a value in a set of edits.

Given a set of linear restrictions $E: {\bf Ax}\odot {\bf b}$ with $\odot\in{<,\leq,==}$, and="" matrix="" ${\bf="" a}$="" with="" columns="" a}_1,{\bf="" a}_2,\ldots,{\bf="" a}_n$.="" substituting="" variable="" $x_j$="" a="" value="" $\tilde{\bf="" x}_j$="" means="" setting="" a}_j="0$" b}="{\bf" a}_j\tilde{x}_j$.<="" p="">

Only rows with :==TRUE are kept. In the kept rows, categories not equal to are set to FALSE Multiple replacements is not yet implemented.

Usage

substValue(E, var, value, ...)

## S3 method for class 'editmatrix': substValue(E, var, value, reduce = FALSE, ...)

## S3 method for class 'editarray': substValue(E, var, value, reduce = FALSE, ...)

Arguments

var
character with name(s) of variable(s) to substitute
value
vector with value(s) of variable(s)
...
arguments to be passed to or from other methods
reduce
logical should variable columns be removed from editmatrix?

Value

  • E, with variables replaced by values

Details

Note that the resulting editmatrix may be inconsistent because of inconsistencies in $\tilde{\bf x}$.