Learn R Programming

editrules (version 2.7.2)

getVars: get names of variables in a set of edits

Description

get names of variables in a set of edits

Usage

getVars(E, ...)

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

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

Arguments

...
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 logic

Value

  • character vector with the names of the variables.

See Also

getA, getb, getAb, getOps

Examples

Run this code
E <- editmatrix(c( "x+3*y == 2*z"
                 , "x > 2")
                 )
getVars(E)

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

getVars(E)

Run the code above in your browser using DataLab