Open
Description
I don't explain the reason for the following differences
julia> modify(compare(ds[!, r"lim"], ds[!, Not(r"lim")], on = 1:3 .=> 1:3, eq = !isless), 1:3=>byrow(x->x.*1))
6×4 Dataset
Row │ a_lim=>a b_lim=>b c_lim=>c row_function
│ identity identity identity identity
│ Bool? Bool? Bool? Array…?
─────┼────────────────────────────────────────────
1 │ true true false [1, 1, 0]
2 │ true false true [1, 0, 1]
3 │ true true true [1, 1, 1]
4 │ false true false [0, 1, 0]
5 │ false false false [0, 0, 0]
6 │ true false false [1, 0, 0]
julia> modify(modify(compare(ds[!, r"lim"], ds[!, Not(r"lim")], on = 1:3 .=> 1:3, eq = !isless), 1:3=>byrow(x->x.*1)),4=>byrow(x->sum(x)))
6×4 Dataset
Row │ a_lim=>a b_lim=>b c_lim=>c row_function
│ identity identity identity identity
│ Bool? Bool? Bool? Int64?
─────┼────────────────────────────────────────────
1 │ true true false 2
2 │ true false true 2
3 │ true true true 3
4 │ false true false 1
5 │ false false false 0
6 │ true false false 1
julia> modify(modify(compare(ds[!, r"lim"], ds[!, Not(r"lim")], on = 1:3 .=> 1:3, eq = !isless), 1:3=>byrow(x->x.*1)),4=>x->sum.(x))
6×4 Dataset
Row │ a_lim=>a b_lim=>b c_lim=>c row_function
│ identity identity identity identity
│ Bool? Bool? Bool? Int64?
─────┼────────────────────────────────────────────
1 │ true true false 2
2 │ true false true 2
3 │ true true true 3
4 │ false true false 1
5 │ false false false 0
6 │ true false false 1
julia> modify(modify(compare(ds[!, r"lim"], ds[!, Not(r"lim")], on = 1:3 .=> 1:3, eq = !isless), 1:3=>byrow(x->x.*1)),4=>byrow(sum))
6×4 Dataset
Row │ a_lim=>a b_lim=>b c_lim=>c row_function
│ identity identity identity identity
│ Bool? Bool? Bool? Array…?
─────┼────────────────────────────────────────────
1 │ true true false [1, 1, 0]
2 │ true false true [1, 0, 1]
3 │ true true true [1, 1, 1]
4 │ false true false [0, 1, 0]
5 │ false false false [0, 0, 0]
6 │ true false false [1, 0, 0]
Metadata
Metadata
Assignees
Labels
No labels