1 @test mean123 { 2 output=$(echo -e '1\n2\n3' | r 'v=d %>% s(m=mean(V1)) %>% .$m %>% cat') 3 [ $output == "2" ] 4 }