You can use R to quickly calculate your final mark for a module from your component marks, assuming you know the weighting of each component (usually provided on the module description). Here’s how:

  1. Start a new project in RStudio.

  2. Enter your percentage marks for each component for the module:

portfolio <- 65
poster <- 22
mcq <- 87
data <- 35

Of course, replace the marks above with your own marks :-)

  1. Combine your marks into one variable using the c command:
components <- c(portfolio, poster, mcq, data)
  1. Enter the weighting for each component (same order as above):
weights <- c(.35, .3, .3, .05)
  1. Calculate the weighted sum of your marks, using the sum command, and then round to the nearest whole percentage, using the round command:
round(sum(components * weights))
[1] 57

The number you get from the above command is your overall module mark.

This material is distributed under a Creative Commons licence. CC-BY-SA 4.0.