Has anyone solved this using R? If so, could you share the steps you took?

I’m currently using this challenge as a way to practice and improve my skills in R, as well as data analysis and statistics in general.
I already have some background in statistics and experience with other statistical software, but I find it hard to learn R just for the sake of learning — I learn much better when I’m working on real problems.

So, I’m trying to complete this challenge as a hands-on exercise.
If anyone has solved it using R and could share the steps or approach you took, I’d really appreciate it!