title: How to multiply matrix element by scalar in R
body: <p>I am struggling to do this simple multiplication, I want to multiply matrix element with constant :</p>
  
  <pre><code>mydata &lt;- read.csv("c:/mydata.csv",header=F,dec=",")
  5*mydata[1,3]
  </code></pre>
  
  <p>I am getting following error :</p>
  
  <pre><code>Warning message:
  In Ops.factor(mydata[1, 3], 0.1) : ‘*’ not meaningful for factors
  </code></pre>
  
  <p>Whats wrong with the code?</p>