Starting with Ubuntu 20.10, and continuing in Ubuntu 21.04, the icon for RStudio project files and RData files was no longer showing up. It had been my experience in prior Ubuntu versions that these icons were correctly associated with the proper mimetype after installing RStudio.
So first I made sure that RStudio still added a mimetype entry for these on installation, finding in usr/share/mime/packages/rstudio.xml
<mime-type type="application/x-r-data">
<comment>R Data File</comment>
<glob pattern="*.RData"/>
<glob pattern="*.Rdata"/>
<glob pattern="*.rdata"/>
<glob pattern="*.rda"/>
</mime-type>
<mime-type type="application/x-r-project">
<comment>R Project</comment>
<glob pattern="*.Rproj"/>
<glob pattern="*.RProj"/>
<glob pattern="*.rproj"/>
</mime-type>
If, that wasn't the issue, I was a little stumped, so I checked to see if others had this problem. I sure enough found an issue filed at Yaru's GitHub repository, but so far it seems like there hasn't been any movement on fixing this issue.1 How can I get these icons back while we wait on the Yaru devs?
1. There has been some movement on the issue as filed, which affects several icon sets, but none of it on the RStudio icons.