title: operating with big.matrix
body: <p>I have to work with big.matrix objects and I can’t compute some functions. Let's consider the following big.matrix:</p>
  
  <pre><code># create big.matrix object
  x &lt;- as.big.matrix(
        matrix( sample(1:10, 20, replace=TRUE), 5, 4,
             dimnames=list( NULL, c("a", "b", "c", "d")) ) )
  
  &gt; x
  An object of class "big.matrix"
  Slot "address":
  &lt;pointer: 0x00000000141beee0&gt;
  </code></pre>
  
  <p>The corresponding matrix object is:</p>
  
  <pre><code># create matrix object
  
  x2&lt;-x[,]
  
  &gt; x2
       a b  c  d
  [1,] 6 9  5  3
  [2,] 3 6 10  8
  [3,] 7 1  2  8
  [4,] 7 8  4 10
  [5,] 6 3  6  4
  </code></pre>
  
  <p>If I compute this operations with the matrix object, it works:</p>
  
  <pre><code>sqrt(slam::col_sums(x2*x2))
  
  &gt; sqrt(slam::col_sums(x2*x2))
         a        b        c        d 
  13.37909 13.82027 13.45362 15.90597 
  </code></pre>
  
  <p>While if I use the big.matrix object (in fact what I have to use), it doesn’t work:</p>
  
  <pre><code>sqrt(biganalytics::colsum(x*x))
  </code></pre>
  
  <p>The problems are 2 : the * operation (to create the square of each element of the matrix), which produces the error:</p>
  
  <blockquote>
    <p>Error in x * x : non-numeric argument transformed into binary operator</p>
  </blockquote>
  
  <p>and the sqrt function, which produces the error :</p>
  
  <blockquote>
    <p>Error in sqrt(x) : non-numeric argument to mathematical function.</p>
  </blockquote>
  
  <p>How can I compute this operations with big.matrix objects?</p>