If x <- 1:5 then the following:
sum(x^2)
returns 55, the correct answer. However, if the pipe operator is used:
x %>% sum(.^2)
then this returns 70 (which happens to be the sum of x^2 and the sum of x).
Although there are some ways around this, I mainly would like to know what's going on.