CreateQualificationType: Create QualificationType

Description Usage Arguments Details Value Author(s) References Examples

Description

Create a QualificationType. This creates a QualificationType, but does not assign it to any workers. All characteristics of the QualificationType (except name and keywords) can be changed later with UpdateQualificationType.

Usage

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
CreateQualificationType(
  name,
  description,
  status,
  keywords = NULL,
  retry.delay = NULL,
  test = NULL,
  answerkey = NULL,
  test.duration = NULL,
  auto = NULL,
  auto.value = NULL,
  verbose = getOption("pyMTurkR.verbose", TRUE)
)

Arguments

name

A name for the QualificationType. This is visible to workers. It cannot be modified by UpdateQualificationType.

description

A longer description of the QualificationType. This is visible to workers. Maximum of 2000 characters.

status

A character vector of “Active” or “Inactive”, indicating whether the QualificationType should be active and visible.

keywords

An optional character string containing a comma-separated set of keywords by which workers can search for the QualificationType. Maximum 1000 characters. These cannot be modified by UpdateQualificationType.

retry.delay

An optional time (in seconds) indicating how long workers have to wait before requesting the QualificationType after an initial rejection. If not specified, retries are disabled and Workers can request a Qualification of this type only once, even if the Worker has not been granted the Qualification.

test

An optional character string consisting of a QuestionForm data structure, used as a test a worker must complete before the QualificationType is granted to them.

answerkey

An optional character string consisting of an AnswerKey data structure, used to automatically score the test

test.duration

An optional time (in seconds) indicating how long workers have to complete the test.

auto

A logical indicating whether the Qualification is automatically granted to workers who request it. Default is NULL meaning FALSE.

auto.value

An optional parameter specifying the value that is automatically assigned to workers when they request it (if the Qualification is automatically granted).

verbose

Optionally print the results of the API request to the standard output. Default is taken from getOption('pyMTurkR.verbose', TRUE).

Details

A function to create a QualificationType. Active QualificationTypes are visible to workers and to other requesters. All characteristics of the QualificationType, other than the name and keywords, can later be modified by UpdateQualificationType. Qualifications can then be used to assign Qualifications to workers with AssignQualification and invoked as QualificationRequirements in RegisterHITType and/or CreateHIT operations.

createqual() is an alias.

Value

A data frame containing the QualificationTypeId and other details of the newly created QualificationType.

Author(s)

Tyler Burleigh, Thomas J. Leeper

References

API Reference

Examples

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
## Not run: 
# Create a Qualification Type
qual1 <- CreateQualificationType(name="Worked for me before",
           description="This qualification is for people who have worked for me before",
           status = "Active",
           keywords = "Worked for me before")
DisposeQualificationType(qual1$QualificationTypeId)


# Create a Qualification Type with a Qualification Test
f <- system.file("templates/qualificationtest1.xml", package = "pyMTurkR")
QuestionForm <- paste0(readLines(f, warn = FALSE), collapse = "")

qual2 <- CreateQualificationType(name = "Qual0001",
                        description = "This is a qualification",
                        status = "Active",
                        test = QuestionForm,
                        test.duration = 30)
DisposeQualificationType(qual2$QualificationTypeId)


# Create a Qualification Type with a Qualification Test and Answer Key
f <- system.file("templates/qualificationtest1.xml", package = "pyMTurkR")
QuestionForm <- paste0(readLines(f, warn = FALSE), collapse = "")
f <- system.file("templates/answerkey1.xml", package = "pyMTurkR")
AnswerKey <- paste0(readLines(f, warn = FALSE), collapse = "")

qual3 <- CreateQualificationType(name = "Qual0001",
                        description = "This is a qualification",
                        status = "Active",
                        test = QuestionForm,
                        test.duration = 30,
                        answerkey = AnswerKey)
DisposeQualificationType(qual3$QualificationTypeId)

## End(Not run)

pyMTurkR documentation built on Nov. 25, 2021, 9:07 a.m.