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 ...
Test projects give you a way to exercise your code to see if it works but they're also part of your project's "permanent record." If all you want to do is try something out with some throwaway code, C ...