Learn R Programming

exams (version 0.9-5)

mchoice2string: Convenience Functions for Exam Generation

Description

A collection of convenience functions for exam generation that can be used for switching between suitable logical/text/numeric representations of multiple choice solutions.

Usage

mchoice2string(x)
  string2mchoice(x)
  mchoice2text(x)

Arguments

x
an object, see below for examples

Details

Three convenience functions for facilitating work with multiple choice solutions of exams. All have almost trivial definitions, see also examples below.

See Also

exams

Examples

Run this code
## multiple choice answer
  mc <- c(TRUE, FALSE, TRUE, FALSE, FALSE)
  
  ## switching to string representation
  mchoice2string(mc)
  
  ## reverse string encoding
  string2mchoice("10100")

  ## switching to text
  mchoice2text(mc)

Run the code above in your browser using DataLab