title: Most efficient way to select ending item of an array?
body: <p>I'm looking for the most efficent way (i.e. the lesser keys pressed) to indexing the last element of an array.</p>
  
  <p>Then something like</p>
  
  <pre><code>a &lt;- c(1,2,3)
  n &lt;- length(a)
  b &lt;- a[n]
  </code></pre>
  
  <p>should not be used, I would like to use just a single command.</p>
  
  <p>In the example above I could use</p>
  
  <pre><code>b &lt;- a[length(a)]
  </code></pre>
  
  <p>but I wonder if something shorter does exist.</p>
  
  <p>Let I want to select a part of an array, like</p>
  
  <pre><code>a &lt;- seq(from = 1, to = 10, by = 1)
  b &lt;- a[3:length(a)]
  </code></pre>
  
  <p>Is there a shorter way to do it?</p>