mchoice2string {exams}R Documentation

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

  ## 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)

[Package exams version 1.0-0 Index]