In the main document, you can include the .tex file with additional commands, as shown in the RStudio documentation here .
I created a new .tex file, which I named "header_pagenrs.tex", which includes only the top 2 lines from @ user4281727's answer:
\setbeamertemplate{navigation symbols}{} \setbeamertemplate{footline}[page number]
Then I referenced this file at the top of my .Rmd file:
--- title: "Things and Stuff" author: "Me" output: beamer_presentation: includes: in_header: header_pagenrs.tex ---
If this still gives you errors, you can also skip some required TeX packages (separate issue from RStudio and rmarkdown).
source share