Let me redpill you on R
I have worked with R to analyze simulation output for the last year. R has made me an angrier, less patient person. For every SIMPLE FUCKING TASK you want to do in R, there are at least three different notations for doing it, only one of which works, DEPENDING ON CONTEXT
Working with R is like trying to have a discussion with a pedantic autist who also has ADHD and can't stick to one way of doing things at a time. You want to do anything more complex than some vector math? You're going to have to deal with this shit.
Avoid R if you can. Use literally any other language with a stats package. R is not a good language. I will not revisit this software once I have finished this project.