title: R: How to store matrix element value as numeric/integer
body: <p>I have this line of code: </p>
  
  <pre><code>value4=sign(t(x)[1,]%*%(y-x%*%beta))
  </code></pre>
  
  <p>when I run it the result will be a 1x1 matrix:</p>
  
  <pre><code>     [,1]
  [1,]   -1 
  </code></pre>
  
  <p>I want to store this value(-1) as numeric, is there any R function with which I can do that?</p>