next up previous contents
Next: Classification with expressions Up: Field evaluator Previous: Field calculator

Record selector

 

selrec Select records according to a boolean expression
-d <data> source data frame
-dout <dataout> output data
-expr <expr>; expression to be evaluated
[-v] verbose evaluation

This command selects those data records into <dataout>, which produce a TRUE value, when the specified boolean expression is evaluated. Note, that the resulting data has the same fields as the source data. The number of data records might be smaller (or even zero), though. The expression must give a boolean value as a result. More information about expressions can be found in section 4.3.1.

Example (ex4.4): This example selects data records, which represent expensive apartments.

NDA> load boston.dat
NDA> selrec -d boston -expr 'boston.rate' > 30; -dout data
# Continue analysis for them
NDA> prepro -d data -dout predata -e -n
NDA> somtr -d predata -sout som1 -l 4
...



Anssi Lensu
Thu May 17 15:00:44 EET DST 2001