Convert expression into index expression for a given list or data frame object

Description

Convert expression into index expression for a given list or data frame object. Uses the input expression to generate the corresponding expression on a given list using the expression variables to address the list items, i.e. for an object X and expression 'a+b' generate the expression 'X$a + X$b'

Usage

1
2
3
4
5
6
## Static method (use this):
## Misc$to.index.expr(obj, expr, ...)

## Don't use the below:
## S3 method for class 'Misc'
to.index.expr(static, obj, expr, ...)

Arguments

obj

Input list or 2data.frame -derived object on which the expression to be constructed.

expr

expression or character string from which the indexed expression on the input object to be constructed.

...

Not used

Value

Indexed expression on a given list or data.frame object.

Author(s)

Alex Lisovich, Roger Day

See Also

For more information see Misc.

Examples

1
2
3
4
## Not run: 
 indexed.expression<-to.index.expr(G,"a | b&c");
 
## End(Not run)

Want to suggest features or report bugs for rdrr.io? Use the GitHub issue tracker.