title: How to remove special character from data frame
body: <p>I have imported data from a url and converted it to a data frame using the following code: </p>
  
  <pre><code>url &lt;-"http://apims.doe.gov.my/v2/hourly2.php"
  tables&lt;- readHTMLTable(url)
  try&lt;-do.call(rbind, lapply(tables, data.frame, stringsAsFactors=FALSE))
  </code></pre>
  
  <p>The data has '*' next to the numbers. I would like to isolate the numbers only.
  So instead of </p>
  
  <pre><code>52* 45* 67* 55*
  </code></pre>
  
  <p>I have </p>
  
  <pre><code>52 45 67 55
  </code></pre>
  
  <p>I have tried several methods to get the * special character out of 3rd through 8th columns and change the column to a numeric but since this character also has a meaning in R these are not working. I have tried:</p>
  
  <pre><code>x &lt;- "~!@#$%^&amp;*" 
  str_replace_all(x, as.character(try[,3:8]), " ") 
  </code></pre>
  
  <p>I have also tried:</p>
  
  <pre><code>gsub("*","",try[,3:8])
  </code></pre>
  
  <p>The only function that has identified the * characters correctly is grep and grapl but I need another function that will use the grep output to remove the '*' special character.</p>
  
  <pre><code>grep('*',try)
  </code></pre>