Learn R Programming

MTurkR (version 0.2)

GenerateQualificationRequirement: Generate QualificationRequirement

Description

Generate a QualificationRequirement data structure for use with CreateHIT or RegisterHITType.

Usage

GenerateQualificationRequirement(qual, comparator, value, preview = NULL, 
								qual.number = NULL, format = "REST")

Arguments

qual
A character string containing a QualificationTypeId, or a vector of QualificationTypeIds. This parameter also accepts shorthand labels for built-in QualificationTypes: Submitted, Accepted, , Aband
comparator
A character string containing a comparator, or a vector of comparators, by which a worker's score of a qualification is compared to the specified value. One of <,<=< code="">,>,>=,==,
value
A numeric or character string value (or vecotr of such) against which workers scores will be compared. Must be a non-negative integer.
preview
An optional logical specifying whether a worker must have the Qualification in order to preview the HIT on the MTurk worker site. The default is FALSE.
qual.number
An optional integer. Intended only for advanced users to construct custom QualificationRequirements.
format
Format of QualificationRequirement (SOAP or REST). Currently only REST is supported (and is the default).

Value

  • Returns a character string containing one or more QualificationRequirements in the form of URL query parameters.

Details

A convenience function to translate the details of a QualificationRequirement into the necessary structure for use in the qual.req parameter of CreateHIT or RegisterHITType. The function accepts three required parameters: qual, comparator, and value. qual must be a valid QualificationTypeId for either a built-in QualificaitonType (see ListQualificationTypes) or a custom QualificationType (e.g., one created with CreateQualificationType). Multiple QualificationRequirements can be generated in one call --- that is, if a requester intends to impose multiple QualificationRequirements on a single HITType, those requirements must be specified in a single call to GenerateQualificationRequirements. Once attached to a HITType, only workers who meet all of the specified QualificationRequirements can complete assignments for a HIT of that HITType.

References

http://docs.amazonwebservices.com/AWSMechTurk/latest/AWSMturkAPI/ApiReference_QualificationRequirementDataStructureArticle.html{API Reference}

See Also

CreateHIT RegisterHITType

Examples

Run this code
a <- ListQualificationTypes()[6,2] # Number of HITs Approved
b <- GenerateQualificationRequirement(a,">","90")

Run the code above in your browser using DataLab