Description Usage Arguments Details Value Author(s) References See Also Examples
Generate a QualificationRequirement data structure for use with CreateHIT
or RegisterHITType
.
1 2 3 4 5 | GenerateQualificationRequirement(qual,
comparator,
value,
preview = NULL,
qual.number = NULL)
|
qual |
A character string containing a QualificationTypeId, or a vector of QualificationTypeIds. This parameter also accepts shorthand labels for built-in QualificationTypes: “Approved” (percent of assignments approved), “NumberApproved” (number of assignments approved), “Locale”, “Adult”, and MTurk “masters” QualificationTypes (“Masters”). |
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 |
A numeric or character string value (or vector of such) against which workers scores will be compared. Must be a non-negative integer, except when |
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 |
qual.number |
An argument for primarily internal use. |
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.
Returns a character string (of class “QualificationRequirement”) containing URL-encoded QualificationRequirements.
Thomas J. Leeper
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 | a <- ListQualificationTypes()[2,2] # Number of HITs Approved
# one QualificationRequirement
q1 <- GenerateQualificationRequirement(a,">","90")
# two QualificationRequirements
q2 <- GenerateQualificationRequirement(c("Locale","Approved"),
c("==",">"),
c("US",90),
preview = TRUE)
# one QualificationRequirement using the 'In' comparator
q3 <- GenerateQualificationRequirement("Locale","In","US,GB")
# two QualificationRequirements using the 'In' comparator
q4 <- GenerateQualificationRequirement(c("Locale","Approved"),
c("==",">"),
c("US,GB,DK",90),
preview = c(TRUE,FALSE))
# `Exists` comparator
q5 <- GenerateQualificationRequirement("Approved", "Exists", "")
# Masters `DoesNotExist` comparator
q6 <- GenerateQualificationRequirement("Masters", "DoesNotExist", "")
# U.S. state locale value
q7a <- GenerateQualificationRequirement("Locale","==","US-MN")
## with multiple states and an 'In' operator
q7b <- GenerateQualificationRequirement("Locale","In","US-MN,US-IL")
# Complex locale values
q8 <- GenerateQualificationRequirement("Locale","In","US-NY,US-WA,CA")
|
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.