Learn R Programming

MTurkR (version 0.8.0)

GrantQualification: Grant/Reject Qualification Request

Description

Grant or reject a worker's request for a Qualification.

Usage

GrantQualification(qual.requests, values, 
                   verbose = getOption('MTurkR.verbose', TRUE), ...)

RejectQualification(qual.requests, reason = NULL, verbose = getOption('MTurkR.verbose', TRUE), ...)

Arguments

qual.requests

A character string containing a QualificationRequestId (for example, returned by GetQualificationRequests), or a vector of QualificationRequestIds.

values

A character string containing the value of the Qualification to be assigned to the worker, or a vector of values of length equal to the number of QualificationRequests.

reason

An optional character string, or vector of character strings of length equal to length of the qual.requests parameter, supplying each worker with a reason for rejecting their request for the Qualification. Workers will see this message. Maximum of 1024 characters.

verbose

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

...

Additional arguments passed to request.

Value

A data frame containing the QualificationRequestId, reason for rejection (if applicable; only for RejectQualification), and whether each request was valid.

Details

Qualifications are publicly visible to workers on the MTurk website and workers can request Qualifications (e.g., when a HIT requires a QualificationType that they have not been assigned). QualificationRequests can be retrieved via GetQualificationRequests. GrantQualification grants the specified qualification requests. Requests can be rejected with RejectQualifications.

Note that granting a qualification may have the consequence of modifying a worker's existing qualification score. For example, if a worker already has a score of 100 on a given QualificationType and then requests the same QualificationType, a GrantQualification action might increase or decrease that worker's qualification score.

Similarly, rejecting a qualification is not the same as revoking a worker's Qualification. For example, if a worker already has a score of 100 on a given QualificationType and then requests the same QualificationType, a RejectQualification leaves the worker's existing Qualification in place. Use RevokeQualification to entirely remove a worker's Qualification.

GrantQualifications() and grantqual() are aliases; RejectQualifications() and rejectrequest() are aliases.

References

API Reference: GrantQualification

API Reference: RejectQualification

See Also

GetQualificationRequests

Examples

Run this code
# NOT RUN {
# create QualificationType
qual1 <- CreateQualificationType(name="Requestable Qualification",
           description="This is a test qualification that can be requested.",
           status = "Active")

# poll for qualification requests
qrs <- GetQualificationRequests(qual1$QualificationTypeId)

# grant a qualification request
GrantQualification(qrs$QualificationRequestId[1], values = "100")

# correct a worker's score (note use of `SubjectId`, not `WorkerId`)
UpdateQualificationScore(qrs$QualificationTypeId[1], qrs$SubjectId[1], value = "95")

# reject a qualification request
RejectQualification(qrs$QualificationTypeId[2], reason = "Sorry!")

# cleanup
DisposeQualificationType(qual1$QualificationTypeId)
# }

Run the code above in your browser using DataLab