Any filter function applied to an indexed column will filter out the NAs present in that column by default (except for EQNA
). So, for example,
the following filter: EQ("A",3)
is actually equal to : !is.na(A) & A == 3
. The functions print(filterExpr)
, toString(filterExpr)
and as.character(filterExpr)
return the string representation of the filter that you would use in a normal data.frame subset.RG
function accepts NA
in from,to
arguments, and this "turns off" the part of the filter set to NA
. So, for instance RG("A",NA,to)
will return all values A <= to<="" code=""> (but still filtering out the NA
values).=>
EQ
function accepts NA
in val
argument, and this simply "turns off" the filter on the column returning all the elements in the column (but still filtering out the NA
values).
IN(colName,values)
function is converted to OR(EQ(colName,values[1]),EQ(colName,value[2]),...)
hence, if values
contains NA
, the filter will return all the elements in the column (but still filtering out the NA
values).
EQNA(colName)
function can be used to select the NAs in the column, which are excluded by the other operators.