Hi I want to create a line graph which shows me the progress of learning outcomes of students from baseline to endline. In the given data frame "data", the student response for addition, subtraction and multiplication are given (1= answered, 2=not answered). The line graph should show the percentage of students who answered correctly from baseline to the endline in such a way that there are three lines representing addition, subtraction and multiplication. The x-axis shows baseline, first endline and second endline while the y-axis shows the % of students who answered correctly. Please help me how to create this visualisation.
library(tidyverse)
library(janitor)
data<-tibble::tribble(
~Student, ~baseline_add, ~baseline_sub, ~baseline_mul, ~endline1_add, ~endline1_sub, ~endline1_mul, ~endline2_add, ~endline2_sub, ~endline2_mul,
"Nithin", 2L, 2L, 2L, 1L, 2L, 2L, 1L, 1L, 2L,
"Pradeep", 2L, 2L, 2L, 1L, 1L, 1L, 1L, 1L, 2L,
"Mrigank", 2L, 2L, 2L, 1L, 1L, 2L, 1L, 1L, 2L,
"Barack", 2L, 2L, 2L, 1L, 1L, 2L, 1L, 1L, 2L,
"Obama", 2L, 2L, 2L, 1L, 1L, 2L, 1L, 1L, 1L,
"Gandhiji", 1L, 1L, 2L, 1L, 1L, 2L, 1L, 1L, 2L,
"Nehru", 1L, 1L, 2L, 1L, 2L, 1L, 1L, 1L, 2L,
"Patel", 1L, 2L, 2L, 1L, 1L, 1L, 1L, 1L, 2L,
"Tara", 2L, 2L, 2L, 1L, 1L, 2L, 1L, 1L, 1L,
"Sid", 1L, 2L, 2L, 1L, 1L, 2L, 1L, 1L, 1L,
"Yen", 1L, 2L, 2L, 1L, 1L, 1L, 1L, 1L, 1L,
"Rub", 1L, 2L, 2L, 1L, 1L, 1L, 1L, 1L, 2L,
"Mep", 2L, 2L, 2L, 1L, 1L, 1L, 1L, 1L, 2L
)