man-roxygen/bin_op.r

#' Binary operators used for building key-value pairs for oshExList
#' 
#' These binary operators are used to query and filter oshex objects. 
#' They allow to apply grep-like textual queries (e.g. using \%eq\% or \%inc\%) and  numerical  queries (e.g. using
#' \%l\%, \%leq\%, etc.) to tags and attributes. See 'Details' below for a description of each operator.
#' 
#' @param k A key to query within an osh object.
#' @param v A value to quey within an osh object.
#' 
#' @section Details:
#' Each operator gets a key-value per as its left-right arguments respectively.
#' \code{\%eq\%}  and \code{\%inc\%} are used as equality operators, to condition a filter operation on an exact match or on a partial match (i.e. that 
#' a the word is included in the result), respectively.
#' 
#' \code{\%meq\%} and \code{\%leq\%} stand for more/less or equal and are capable to condition a filter operation based on
#' the following numerical conditions: '>=', '<='.
#' Similarly, \code{\%m\%} and \code{\%l\%} allow to condition filter operation based on the following numerical conditions: '>', '<' 
#'
#' @examples 
#' # A condition to filter all objects that 
#' # have a 'landuse:highway' key-value pair
#' 
#' landuse %eq% highway
#' 
#' # A condition to filter all object that have a key equals to 
#' # addr:housenumber and values higher or equal to 30
#' 
#' addr:housenumber %meq% 30
#' 
#' # A condition to filter all objects that have a building key
#' 
#' building %eq% "."
#' building %inc% .
dof1985/OSHEX documentation built on May 28, 2019, 3:36 p.m.