title: changing specific area from character to numeric in R programming
body: <p>I use Rstudio and imported a csv file from online. </p>
  
  <pre><code>data &lt;- read.csv("http://databank.worldbank.org/data/download/GDP.csv", stringsAsFactors = FALSE)
  </code></pre>
  
  <p>In the file, column X.3 is of type character.</p>
  
  <p>I want to convert row (5 to 202) from character to numeric so that I can calculate mean of it.</p>
  
  <p>So, when I use this line below. It still remains as character</p>
  
  <pre><code>data[c(5:202),"X.3"] &lt;- as.numeric(gsub(",","",data[c(5:202),"X.3"]))
  </code></pre>
  
  <p>when i type <code>class(data[10,"X.3"])</code> it shows the output as <code>character</code></p>
  
  <p>I am able to convert the whole column to numeric using</p>
  
  <pre><code>data[,"X.3"] &lt;- as.numeric(gsub(",","",data[,"X.3"]))
  </code></pre>
  
  <p>but i want to convert only specific row's ie from 5 to 202 beacause the other rows of the column becomes <code>N/A</code>. i am not sure how to do it. </p>