Go to basic R

Go to import data

Go to making figures

Exercise 1. Import and Select subject, timepoint and sj.max from the cycling study data set. Print your results. What does printing do?

Solution Ex. 1


Exercise 2. Filter the cycling data set based on time-point keep only observations from time-point pre.

Solution Ex. 2


Exercise 3. Select only columns subject and sj.max. Filter the cycling data set based on time-point keep only observations from time-point pre and meso1. . In what order must you do the operations in order to get it to work?

Solution Ex. 3


Exercise 4. weight.T1 is the weight in kg and VO2.max is the \(\dot VO_{2max}\) in \(ml \times min^{-1}\) from each test. Select the needed variables, filter needed observations, create a new variable \(\dot VO_{2max} / kg\) and calculate the percentage change from time-point “pre” to “meso3”. This operation should include mutate(), filter(), pivot_wider.

Solution Ex. 4


Exercise 5. Do the same as above but keep the group variable. Calculate the mean of each group in percentage change from pre- to meso3. In the data set there are three groups: “INCR” increased intensity through the training period, “DECR” decreased intensity and “MIX” performed a mix of intensities each week.

Solution Ex. 5


Exercise 6. \(\dot VO_2\) meassures were collected during submaximal exercise, variables VO2.125:VO2.375 are \(\dot VO_2\) measurements from each watt. Transform the data to get this to tidy format.

Solution Ex. 6


Exercise 7. \(\dot VO_2\) meassures were collected during submaximal exercise, variables VO2.125:VO2.375 are \(\dot VO_2\) measurements from each watt. Transform the data to get this to tidy format. Calculate the mean \(\dot VO_2\) for each group, timepoint and watt.

Solution Ex. 7