Thanks @cderv!
I think I had this problem because I was editing a .tex file directly in RStudio, rather than directly editing the .Rmd file.
I don't often find myself in the position where I am editing a .tex file, so maybe that's why I hadn't encountered it before.
Reading through the tinytex documentation, it seems like I should have called latexmk() on the TeX file. That is super useful!
But I still feel like it would be really useful to have a solution to extract all the packages required by a LaTeX document, and then have a way to try and install them.
The log file approach in tinytex::parse_packages() is great, but I think that something more explicit like extract_packages() would signal to me the user a way forward.
Do you think I should I submit an issue on tinytex, or is it better to have discussion here?