getVars: get names of variables in a set of edits

Description Usage Arguments Value See Also Examples

Description

get names of variables in a set of edits

getr variable names

get variable names

Usage

1
2
3
4
5
6
7
8
getVars(E, ...)

## S3 method for class 'editset'
getVars(E, type = c("all", "num", "cat", "mix", "dummy"),
  ...)

## S3 method for class 'NULL'
getVars(E, ...)

Arguments

E

editset, editmatrix, or editarray

...

Arguments to be passed to or from other methods

type

(editset- or list only) select which variables to return. all means all (except dummies), num means all numericals, cat means all categoricals, mix means those numericals appearing in a logical constraint and dummy means dummy variables connecting the logical with numerical constraints.

Value

character vector with the names of the variables.

See Also

getA, getb, getAb, getOps

Examples

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
E <- editmatrix(c( "x+3*y == 2*z"
                 , "x > 2")
                 )
getVars(E)

E <- editarray(expression(
    gender %in% c('male','female'),
    pregnant %in% c(TRUE, FALSE),
    if( gender == 'male' ) pregnant == FALSE
    )
)

getVars(E)

editrules documentation built on May 1, 2019, 6:32 p.m.