title: How to read the nth line of a Parsed html in R
body: <p>The readLines function displays all the content of the source page in one line.</p>
  
  <pre><code>con = url("target_url_here")
  htmlcode = readLines(con)
  </code></pre>
  
  <p>readLines function has concatenated all the lines of the source page in one line. So there is no way I can navigate to the 15th line in the original html source page.</p>
  
  <p>Next approach is to try parsing it using XML package or httr package.</p>
  
  <pre><code>library("httr")
  html &lt;- GET("target_url_here")
  content2 = content(html,as="text")
  parsedHtml = htmlParse(content2,asText=TRUE)
  </code></pre>
  
  <p>By printing out the parsedHtml, it retains the html format and displays all the contents as it can be seen in the source page.
  Now suppose I want to extract the title, so the function     </p>
  
  <pre><code>xpathSApply(parsedHtml,"//title",xmlValue)
  </code></pre>
  
  <p>will give the title.</p>
  
  <p>But my question is, how do I navigate to any line say the 15th line of the html? In other words, how can I treat the html as a vector of strings, where each element of the vector is a separate line in the html page/parsed html object.</p>