Learning R: Surviving my PhD

Learning R programming language has literally been the biggest learning curve throughout my PhD candidature, yet also what has allowed me to survive. I remember always reading Mladen talk about R on complementarytraining.net but never thought I would be smart enough to understand it, nor thought I would ever need to use it. Move forward to Spring 2019 and I had just finished my first data collection for me PhD. The study was based on a validation of Samozino’s method to determine vertical force-velocity profiles (*which has recently (Sept-21) been accepted for publication in JSCR). In total, I had collected data for approximately 800-900 countermovement jumps, and therefore 800-900 force-time csv files. I needed to extract data from these csv files specific to the propulsive phase of the jump… So what do I do, I open the files in excel and start to look at the force trace. I read through the literature and begin to make notes about how to identify the different phases of the CMJ e.g. unweighting, braking, propulsion, flight, landing; then set out to work out which row number each phase starts and stops etc. My anxiety levels were rising thinking ‘how am I going to do this type of analysis for 900 files?’ ‘There must be an easier way to do this???’

Lucky for me I met Matt Tredrea. At the time, Matt was in Adelaide with his wife Kristie who was the S&C coach for the Adelaide Thunderbirds. Matt was about 12mths ahead of my in his PhD and his thesis was on a similar topic, and therefore had already been down the excel path. I remember we had a meeting at my university where he was talking about loading ‘packages’ and creating ‘vectors’, ‘plots’ and ‘loops’. He may as well have been speaking Mandarin. The learning curve was steep. However, with the help of his colleagues at Latrobe University, we eventually had an R script written with a loop in it to extract key data from countermovement jump files. I clicked ‘run code’. Three minutes later I had processed 900 csv files, extracted the key variables/phases of each jump and had them saved in a new folder. I could have cried. It was bloody magic. The script was likely very unattractive to a data scientist, but to us, it just worked.

Since late 2019, I have been using R for all my studies to extract key variables, statistical analysis and data visualization. It is such a powerful programme and if you are undertaking a thesis with quantitative analysis, I cannot recommend learning it enough.

Below is a plot I made early on when we first started learning R. It is pretty basic but this is where we started.

For those looking to learn more there are some fantastic resources on the net and great practitioners who constantly share their work.

Good luck.

Share this content: