title: convert integer to double in R
body: <p>I have encountered this problem in R
  I have one value which is of type Integer</p>
  
  <pre><code>typeof(res[3,"V2.review/score"])
  [1] "integer"
  </code></pre>
  
  <p>And I want to assign this value to a Double column</p>
  
  <pre><code>typeof(HLPMatrix[1,1])
  [1] "double"
  </code></pre>
  
  <p>The value in</p>
  
  <pre><code>res[3,"V2.review/score"]
  [1]  4.0
  </code></pre>
  
  <p>But when I use assignment</p>
  
  <pre><code>HLPMatrix[1,1]&lt;-res[3,"V2.review/score"]
  HLPMatrix[1,1]
  [1] 122
  </code></pre>
  
  <p>HLPMatrix[1,1] gets value 122</p>
  
  <p>Is there any solution to this
  I tried as.double and as.numeric options but that also returns the same value
  I want Assignment of value 4.0 to this HLPMatrix[1,1]</p>