How to create your own RSS reader with R

Sure, you could use one of the commercial or open-source RSS readers. But isn’t it more fun to code your own?

Data stream. Bright, colorful background with bokeh effect

RSS feeds have been around since the late ’90s, and they remain a handy way to keep up with multiple news sources. Choose your feeds wisely, and your RSS reader will let you easily scan headlines from multiple sources and stay up to date on fast-moving topics. And while there are several capable commercial and open-source RSS readers available, it's a lot more satisfying to code your own.

It’s surprisingly easy to create your own RSS feed reader in R. Just follow these eight steps.

Create a Quarto document or R script file

You can use a plain R script, but Quarto adds some useful, out-of-the-box styling. Quarto also gives you easier access to using JavaScript for the final display if you so choose. But the tutorial code works fine in an R file, too.

Unlike an R script, though, my Quarto document needs a YAML header to start. I’ll add a few settings in the YAML to generate a single HTML file (embed-resources: true), and not display my code (echo: false) or any code messages or warnings:

---
title: "Sharon's RSS Feed"
format:
html
embed-resources: true
editor: source
execute:
echo: false
warning: false
message: false
---
1 2 Page 1
Page 1 of 2