title: how to scrape a hyperlink by R and keep the hyperlink clickable in the output file?
body: <p>I am an R beginner who is trying to look through all the top 500/1000 vote/frequent questions in StackOverflow. </p>
  
  <p>I need a data.frame with two variables that contain the question and the hyperlink of this question, respectively. </p>
  
  <p>The webpage is <a href="https://stackoverflow.com/questions/tagged/r?tab=votes&amp;page=1&amp;pagesize=50">here</a> and need hyperlinks like this:</p>
  
  <pre><code>        &lt;h3&gt;&lt;a href="/questions/5963269/how-to-make-a-great-r-reproducible-example" class="question-hyperlink"&gt;How to make a great R reproducible example&lt;/a&gt;&lt;/h3&gt;
  </code></pre>
  
  <p>output like this:</p>
  
  <pre><code>         question                                    link
      1    how-to-make-a-great-r-reproducible-example  &lt;questions/5963269/how-to-make-a-great-r-reproducible-example&gt;
      2 ...
      3 ...
  </code></pre>
  
  <p>sorry for my confused questions: 
  I would like to have the hyperlink that can link to the webpage by clicking it. so I get the full url by </p>
  
  <pre><code>web &lt;- data.frame(sapply(answer$link, function(x) {paste("https://stackoverflow.com",x, sep = "")}))
  </code></pre>
  
  <p>or</p>
  
  <pre><code>web &lt;- data.frame(sapply(df[2], function(x) {paste("https://stackoverflow.com",x, sep = "")}))
  
  web[1]
  https://stackoverflow.com/questions/5963269/how-to-make-a-great-r-reproducible-example
  </code></pre>
  
  <p>like [here] (<a href="https://stackoverflow.com/questions/5963269/how-to-make-a-great-r-reproducible-example">How to make a great R reproducible example</a>)</p>
  
  <p>I output this file to txt or CSV, but the links could not link the page when I click it.</p>
  
  <p>could you improve it? thanks again</p>
  
  <p>@DaveT
  @QHarr</p>