to_odata {ODataQuery} | R Documentation |
Macro to convert R to OData syntax
Description
Macro to convert R to OData syntax
Usage
to_odata(expr)
to_odata_(expr)
Arguments
expr |
Expression to convert to OData |
Details
to_odata takes unquote R code and quotes its input. Use !! to unquote an argument. to_odata_ requires its argument to be quoted already.
Only a subset of R is supported.
* arithmatic The operators +, -, *, / and
* strings (characters in R) toupper, tolower, startsWith, endsWith, nchar, paste, paste0, trimws
* arrays (lists in R) list, append, length
* Formulae become lambdas in OData (x ~ x$Name == "John")
Every unknown function is passed as is. If the function name is surrounded by percent signs it's treated as an infix operator.
Examples
to_odata(Field == value)
address <- "Bakerstreet 4"
to_odata(!!address %in% Adresses)
to_odata(Friends$any(f ~ f$FirstName == 'John'))
[Package ODataQuery version 0.5.3 Index]