Display text content of a html document

Is there an easy way to display a simple plaintext summary of a HTML document or section thereof, ignoring tags, scripts, etc? You can see something like what I mean at: Recently Active 'r' Questions - Stack Overflow where each question has a couple of lines displayed.

The context is I'm working with emails in an Outlook message folder, and I'd like to be able to display a list of emails. These will usually be HTML-formatted, but rather than just print a mess of tags, I'd like to show something more meaningful.

For a simple answer, you could use the rvest package to get the text. You can check an example of how you can web scrape here:

Also, you can find a lot of tutorials on this on YouTube as well.

This topic was automatically closed 21 days after the last reply. New replies are no longer allowed.

If you have a query related to it or one of the replies, start a new topic and refer back with a link.