DataFrame icon indicating copy to clipboard operation
DataFrame copied to clipboard

Add ability to tabulate: like in Matrix

Open philippeback opened this issue 8 years ago • 0 comments

ut := Matrix rows: rows columns: columns tabulate: [ :r :c |
    | v |
    c = 2 ifTrue: [ v := r \\ 10. v = 0 ifTrue: [ v := 10 ]].
    c = 1 ifTrue: [ v := r // 10.  (r \\ 10) = 0 ifTrue: [ v := v - 1] . v:= v + 1].
    c = 3 ifTrue: [ v := 0 ].
    c = 4 ifTrue: [ v := 0 ].

    v ].

so, DataFrame rows: 100 columns: 3 tabulate: [:rowIndex :colIndex | ... ] Code could be better, but you get the point

philippeback avatar Sep 18 '17 11:09 philippeback