4.73 or - Logical Disjunction

Format: or($bool_1,bool_2,\cdots $)

Compute the boolean result using logical disjunction on the array of boolean values in $bool_ i$. Refer to Table 4.9 on the boolean truth table with NULL values.

Examples

Example 1: Basic Example

$ more dat1.csv
id,b1,b2,b3
1,1,0,0
2,1,,1
3,0,,0
4,0,0,0
$ mcal c='or($b{b1},$b{b2},$b{b3})' a=rsl i=dat1.csv o=rsl1.csv
#END# kgcal a=rsl c=or($b{b1},$b{b2},$b{b3}) i=dat1.csv o=rsl1.csv
$ more rsl1.csv
id,b1,b2,b3,rsl
1,1,0,0,1
2,1,,1,1
3,0,,0,
4,0,0,0,0

Example 2: Example using wildcard

Use the wildcard character “b*” to specify columns starting from b (b1,b2,b3).

$ mcal c='or($b{b*})' a=rsl i=dat1.csv o=rsl2.csv
#END# kgcal a=rsl c=or($b{b*}) i=dat1.csv o=rsl2.csv
$ more rsl2.csv
id,b1,b2,b3,rsl
1,1,0,0,1
2,1,,1,1
3,0,,0,
4,0,0,0,0