Many R packages have been built for us and are available when we load R with the module system. For example, the module r/4.0.5-py27 makes available about 514 packages, including tidyverse, rstan, etc ...
Note that GitHub Copilot isn’t optimized for R; the documentation says Copilot works “especially well” for Python, JavaScript, TypeScript, Ruby, Go, C#, and C++. However, Copilot does make R code ...