package "dplyr" has a chain operator. But I have a problem with how to get the right side term itself.
For example:
c(5,7,8,1) %>% sum(`[`(1:3)) # get result 27 (This is wrong)
c(5,7,8,1) %>% sum(.[1:3]) # get result 41 (This is also wrong)
c(5,7,8,1) %>% `[`(1:3) %>% sum() # get result 20 (This is right)
Why the first line and second line codes are wrong? What has happened in them?