Can someone explain how my order of operations for the R fuctions below is wrong? I expected to multiply across each row then sum the result, but the answer I got was very different.
qqq%>%sum(.[,1]*.[,2]) #returns: 53
# answer I expected: 1*4+2*5+3*6 = 32
We can try
qqq %>% Reduce(`*`, .) %>% sum # 32