This function gets an answer sheet of the original version of the exam as a data frame, and a parsed list, which is obtained from GradeExams
and it outputs the statistics of how many answers are parsed exam, that is graded and obtains from there
Arguments
- OriginalExamAnswerSheet
The answer sheet of the original exam. (In this package the convention is the exam version "0")
- ExamAnswerParsedList
A parsed list for every student, as outputted by
GradeExams
- names.FullExamOriginalCols
Names of those columns that in the answer sheet identify for all versions where that item is found on the original columns, (i.e., as ordered from the original version exam)
Value
Returns the OriginalExamAnswerSheet
with a column added to it, named "ExamAnswerCount
" that counts the number of answers for each question
See also
Other Grading Exams:
GradeExams()
Examples
asheet_file <-
system.file(
"extdata",
"ExampleTables",
"ExampleAnswerSheet.csv",
package = "TexExamRandomizer")
responses_file <-
system.file(
"extdata",
"ExampleTables",
"ExampleResponses.csv",
package = "TexExamRandomizer")
FullAnswerSheet <-
read.csv(
asheet_file,
header = TRUE,
stringsAsFactors = FALSE,
na.strings = c("", "NA", "Na"),
strip.white = TRUE)
Responses <- read.csv(
responses_file,
header = TRUE,
stringsAsFactors = FALSE,
na.strings = c("", "NA", "Na"),
strip.white = TRUE)
compiledanswers <-
WhichAnswerOriginal(
StudentAnswers = Responses,
FullExamAnswerSheet = FullAnswerSheet,
names.StudentAnswerQCols = grep(
names(Responses),
pattern = "^Q.*[[:digit:]]",
value = TRUE),
names.StudentAnswerExamVersion = grep(
names(Responses),
pattern = "Version",
value = TRUE),
OriginalExamVersion = 0,
names.FullExamVersion = "Version",
names.FullExamOriginalCols = grep(
names(FullAnswerSheet),
pattern = "_original",
value = TRUE),
names.CorrectAndIncorrectCols = c(
"choice",
"CorrectChoice")
)
#> Warning: Answer not found in the Answer Sheet
#> Warning: Out Of Bounds answer by the current student
#> Warning: Answer not found in the Answer Sheet
#> Warning: Out Of Bounds answer by the current student
#> Warning: Answer not found in the Answer Sheet
#> Warning: Out Of Bounds answer by the current student
#> Warning: Answer not found in the Answer Sheet
#> Warning: Out Of Bounds answer by the current student
#> Warning: Answer not found in the Answer Sheet
#> Warning: Answer not found in the Answer Sheet
#> Warning: Out Of Bounds answer by the current student
#> Warning: Out Of Bounds answer by the current student
#> Warning: Answer not found in the Answer Sheet
#> Warning: Out Of Bounds answer by the current student
#> Warning: Answer not found in the Answer Sheet
#> Warning: Answer not found in the Answer Sheet
#> Warning: Out Of Bounds answer by the current student
#> Warning: Out Of Bounds answer by the current student
#> Warning: Answer not found in the Answer Sheet
#> Warning: Out Of Bounds answer by the current student
#> Warning: Answer not found in the Answer Sheet
#> Warning: Out Of Bounds answer by the current student
#> Warning: Answer not found in the Answer Sheet
#> Warning: Out Of Bounds answer by the current student
#> Warning: Answer not found in the Answer Sheet
#> Warning: Answer not found in the Answer Sheet
#> Warning: Answer not found in the Answer Sheet
#> Warning: Out Of Bounds answer by the current student
#> Warning: Out Of Bounds answer by the current student
#> Warning: Out Of Bounds answer by the current student
#> Warning: Answer not found in the Answer Sheet
#> Warning: Answer not found in the Answer Sheet
#> Warning: Out Of Bounds answer by the current student
#> Warning: Out Of Bounds answer by the current student
#> Warning: Answer not found in the Answer Sheet
#> Warning: Out Of Bounds answer by the current student
#> Warning: Answer not found in the Answer Sheet
#> Warning: Answer not found in the Answer Sheet
#> Warning: Out Of Bounds answer by the current student
#> Warning: Out Of Bounds answer by the current student
#> Warning: Answer not found in the Answer Sheet
#> Warning: Out Of Bounds answer by the current student
#> Warning: Answer not found in the Answer Sheet
#> Warning: Answer not found in the Answer Sheet
#> Warning: Answer not found in the Answer Sheet
#> Warning: Out Of Bounds answer by the current student
#> Warning: Out Of Bounds answer by the current student
#> Warning: Out Of Bounds answer by the current student
#> Warning: Answer not found in the Answer Sheet
#> Warning: Answer not found in the Answer Sheet
#> Warning: Out Of Bounds answer by the current student
#> Warning: Out Of Bounds answer by the current student
#> Warning: Answer not found in the Answer Sheet
#> Warning: Out Of Bounds answer by the current student
#> Warning: Answer not found in the Answer Sheet
#> Warning: Answer not found in the Answer Sheet
#> Warning: Out Of Bounds answer by the current student
#> Warning: Out Of Bounds answer by the current student
#> Warning: Answer not found in the Answer Sheet
#> Warning: Out Of Bounds answer by the current student
#> Warning: Answer not found in the Answer Sheet
#> Warning: Answer not found in the Answer Sheet
#> Warning: Out Of Bounds answer by the current student
#> Warning: Out Of Bounds answer by the current student
#> Warning: Answer not found in the Answer Sheet
#> Warning: Answer not found in the Answer Sheet
#> Warning: Out Of Bounds answer by the current student
#> Warning: Out Of Bounds answer by the current student
#> Warning: Answer not found in the Answer Sheet
#> Warning: Out Of Bounds answer by the current student
#> Warning: Answer not found in the Answer Sheet
#> Warning: Answer not found in the Answer Sheet
#> Warning: Out Of Bounds answer by the current student
#> Warning: Out Of Bounds answer by the current student
#> Warning: Answer not found in the Answer Sheet
#> Warning: Out Of Bounds answer by the current student
#> Warning: Answer not found in the Answer Sheet
#> Warning: Answer not found in the Answer Sheet
#> Warning: Out Of Bounds answer by the current student
#> Warning: Out Of Bounds answer by the current student
#> Warning: Answer not found in the Answer Sheet
#> Warning: Out Of Bounds answer by the current student
#> Warning: Answer not found in the Answer Sheet
#> Warning: Answer not found in the Answer Sheet
#> Warning: Out Of Bounds answer by the current student
#> Warning: Out Of Bounds answer by the current student
#> Warning: Answer not found in the Answer Sheet
#> Warning: Answer not found in the Answer Sheet
#> Warning: Answer not found in the Answer Sheet
#> Warning: Out Of Bounds answer by the current student
#> Warning: Out Of Bounds answer by the current student
#> Warning: Out Of Bounds answer by the current student
#> Warning: Answer not found in the Answer Sheet
#> Warning: Answer not found in the Answer Sheet
#> Warning: Out Of Bounds answer by the current student
#> Warning: Out Of Bounds answer by the current student
#> Warning: Answer not found in the Answer Sheet
#> Warning: Out Of Bounds answer by the current student
#> Warning: Answer not found in the Answer Sheet
#> Warning: Out Of Bounds answer by the current student
#> Warning: Answer not found in the Answer Sheet
#> Warning: Answer not found in the Answer Sheet
#> Warning: Out Of Bounds answer by the current student
#> Warning: Out Of Bounds answer by the current student
#> Warning: Answer not found in the Answer Sheet
#> Warning: Answer not found in the Answer Sheet
#> Warning: Out Of Bounds answer by the current student
#> Warning: Out Of Bounds answer by the current student
#> Warning: Answer not found in the Answer Sheet
#> Warning: Out Of Bounds answer by the current student
#> Warning: Answer not found in the Answer Sheet
#> Warning: Out Of Bounds answer by the current student
#> Warning: Answer not found in the Answer Sheet
#> Warning: Answer not found in the Answer Sheet
#> Warning: Out Of Bounds answer by the current student
#> Warning: Out Of Bounds answer by the current student
OriginalAnswerSheet <- FullAnswerSheet[FullAnswerSheet$Version == 0,]
ExamStats <-
ObtainExamStats(
OriginalExamAnswerSheet = OriginalAnswerSheet,
ExamAnswerParsedList = compiledanswers,
names.FullExamOriginalCols = grep(
names(FullAnswerSheet),
pattern = "_original",
value = TRUE)
)