filter: Parse multiple R expressions into a list of boolean...

View source: R/afl.R

filterR Documentation

Parse multiple R expressions into a list of boolean expressions

Description

This method takes a variable number of R expressions as arguments, returning a list of scidb.expression objects. There are three formats for constructing a boolean expression

  • Named value: an expression like x = 1 is evaluated as the expression x == 1, while one like x %in% c(1,2,3) is evaluated as x %in% c(1,2,3)

  • Named scidb predicate expression: an expression like x = IN_RANGE(4,10) is evaluated as x >= 4 && x <= 10, making use of the anonymous predicate method scidb::IN_RANGE. The page scidb predicate expressions lists the available expressions

  • Arbitrary expression evaluating to a boolean; this is parsed with expression_parser and cannot take the form of a named argument x = ....

Usage

filter(...)

Arguments

...

R expressions representing compound predicates to be applied jointly to possibly-multiple bound variables

Value

a list of scidb.expression objects corresponding to each input expression

Examples

## Not run: 
 scidb::filter(x = 1)
 scidb::filter(x %in% c(1,2,3))
 scidb::filter(x = IN_RANGE(5,10) | IN_RANGE(15,20))
 scidb::filter(foo %like% "hello", bar %like% "world")
 scidb::filter(foo %like% "hello" || bar %like% "world")
 scidb::filter(nchar(foo) > 5)

## End(Not run)

Paradigm4/SciDBR documentation built on Nov. 9, 2023, 4:58 a.m.