Does @chain
have (or can it be given) the equivalent of Pipe’s dot pipe .|>
I know you can use transform with ByRow, or vectorise a function within a chain block, but it would be very nice to just drop to element level the way you can with @pipe
Example
df = DataFrame( A=[1,2,3], B=[4,5,6])
#with @pipe
@pipe eachrow(df) .|>
begin
sumAB = _.A + _.B
diffAB = _.A - _.B
(; sumAB, diffAB)
end |>
DataFrame
#with @chain
@chain df begin
eachrow . #"." indicates pass at element level - like .|>
begin
sumAB = _.A + _.B
diffAB = _.A - _.B
(; sumAB, diffAB)
end # no "." so pass at aggregate level, like usual
DataFrame
end