R calculating scores with mutate
library(tidyverse)
# load the data
df <- read_csv("https://pastebin.com/raw/1yJ5Xsaa")
# calculate score with mutate
df %>%
mutate(sum_goi = rowSums(df[2:7])) %>%
mutate(score = round(.$exam/100*50+.$sum_goi/60*50,1))
## # A tibble: 11 x 10
## name goi1 goi2 goi3 goi4 goi5 goi6 exam sum_goi score
## <chr> <dbl> <dbl> <dbl> <dbl> <dbl> <dbl> <dbl> <dbl> <dbl>
## 1 a 0 0 4 1 4 5 39 14 31.2
## 2 b 4 4 4 4 6 0 58 22 47.3
## 3 c 8 5 4 6 8 5 78 36 69
## 4 d 0 0 4 7 10 5 97 26 70.2
## 5 e 6 2 10 8 8 8 78 42 74
## 6 f 4 0 3 5 7 5 68 24 54
## 7 g 6 3 2 5 6 6 58 28 52.3
## 8 h 7 4 9 10 9 10 87 49 84.3
## 9 i 6 3 6 3 5 2 48 25 44.8
## 10 j 6 0 3 6 8 0 78 23 58.2
## 11 k 4 1 0 3 5 4 48 17 38.2