I have a date.frame with many codes in the rows and many columns of questions, I'm making the simple frequency of each question would like to know how to vary the courses and questions at once, without having to manually repeat the code I generated a thousand times?
cursos <- c(rep(12671,10))
pergunta1 <- c(1,2,3,4,5,6,7,7,2,1)
pergunta2 <- c(1,1,2,1,3,4,2,1,3,3)
df <- data.frame(cursos,pergunta1,pergunta2)