title: When using "apply", can I return just one value of a function?
body: <p>I'm not familiarized with the <code>apply</code> in R. When I try to return just one value of the function, it can't return that. This problem might be very easy to solve, but I'm not getting to it.</p>
  
  <p>For example, when I try with the function <code>sens.slope</code> (From package <code>trend</code> ), it won't return just one numeric value.</p>
  
  <pre><code>&gt; e &lt;- matrix(1:50, nrow = 5)
  &gt; apply(e,2, sens.slope$estimates)
  Error in sens.slope$estimates : 
    object of type 'closure' is not subsettable 
  </code></pre>
  
  <p>Is there another solution? Thank you!</p>