title: HTML scraping - R scrapR
body: <p>I am trying to parse data encoded in HTML format. Example of the string I am trying to parse is:</p>
  
  <pre><code>Simplify the polynomial by combining like terms. &lt;img src=\"/flx/math/inline/3x%2B12-11x%2B14\" class=\"x-math\" alt=\"3x+12-11x+14\" /&gt;
  </code></pre>
  
  <p>I want to get the text before <code>&lt;img</code> and the text in <code>alt=</code></p>
  
  <p>Desired output:</p>
  
  <pre><code>Simplify the polynomial by combining like terms. 3x+12-11x+14  
  </code></pre>
  
  <p>I tried scrapeR.  </p>
  
  <pre><code>y1 = scrape (str1)  # the above string is in str1 (as a vector)
  </code></pre>
  
  <p>I get the following error message</p>
  
  <pre><code>Error in which(value == defs) : 
    argument "code" is missing, with no default
  </code></pre>
  
  <p>Has anyone played with scrapeR. I am not sure what "code" refers to as it is an option
  and is not described in the manual. Just trying to see which default value is affecting this.</p>