Learn R Programming

ProfessR (version 2.1)

COMPbank: Compare Question Banks

Description

Compare two question banks to find non-duplicated questions

Usage

COMPbank(Qbank1, Qbank2)

Arguments

Qbank1
Question Bank 1
Qbank2
Question Bank 2

Value

  • Vector index of questions in Qbank2 that are not found in Qbank1.

Details

Uses match to find matching questions in the two question banks.

See Also

SELbank

Examples

Run this code
LF = list.files(path="/home/lees/Class/GEOL_105/TESTBANK/EXAM_1", pattern="txt", full.names=TRUE )

kbank = vector(mode='list')
######   read in the question banks, each in one file
for(i in 1:length(LF))
  {
    h = Get.testbank(LF[i])
    kbank[[i]] = Get.testbank(LF[i])

  }
names(kbank) = LF
Kbank =  vector(mode='list')

for(i in 1:length(kbank))
  {

Kbank = c(Kbank, kbank[[i]])

  }

q2 = COMPbank(Kbank, kbank[[3]] )

###########  to extract these:
subq2 = subsetbank(kbank[[3]] , q2)
###########  to get the overlapping questions:

olap = 1:length(kbank[[3]])
olap[-q2]

Run the code above in your browser using DataLab