Learn R Programming

ProfessR (version 2.4-1)

SELbank: Select Questions from a bank

Description

Select, random set of questions from a test bank.

Usage

SELbank(QB, N, xclude=NULL)

Value

Question bank

Arguments

QB

Question bank

N

integer, number of questions to select

xclude

integer vector, index of questions to exclude, default=NULL

Author

Jonathan M. Lees<jonathan.lees@unc.edu>

Details

Progam uses sample to get a random perturbation, and then pulls out the first N questions

See Also

Get.testbank

Examples

Run this code

if (FALSE) {
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]])

  }

##########   get 50 sample questions
NEWQB = SELbank(Kbank, 50)

}

Run the code above in your browser using DataLab