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