title: Download only *.Rmd files from a github repository using R or Rmd
body: <p>I would like to download all of the *.Rmd files in a github repository.</p>
  <p>For a simple example, say I wanted to use R or an Rmd file to download all of the *.Rmd files in this repo:</p>
  <p><a href="https://github.com/maelle/rmd-blogging-course" rel="nofollow noreferrer">https://github.com/maelle/rmd-blogging-course</a></p>
  <p>I tried using a <code>bash</code> chunk in my Rmd file and <code>wget</code>, but wasn't able to get the Rmd files:</p>
  <pre><code>#\```{bash}
  wget -r -k --accept *.Rmd https://github.com/maelle/rmd-blogging-course
  #\```
  </code></pre>
  <p>I've seen this previous question on how to download an entire repo, but I'm after only the files of a certain extension.</p>
  <p><a href="https://stackoverflow.com/questions/48612676/how-to-download-entire-repository-from-github-using-r">How to download entire repository from Github using R?</a></p>