I need to gather multiple columns into one key and two values. I encountered a lot of similar questions here, but i cannot reproduce the answers since they were very specific and not well explained imho. If there is one, which answers my question, i´m happy with a link.
Example df:
df <- data.frame(semester=rep(1:6),
Anna_try1=c(1,2,2,1,4,2),
Lena_try1=c(3,4,2,3,2,1),
Anna_try2=c(2,3,1,2,1,4),
Lena_try2=c(2,4,2,1,5,2))
which looks like this:
And i need something like this:

