Learn R Programming

MTurkR (version 0.5.1)

ApproveAssignment: Approve Assignment(s)

Description

Approve one or more submitted assignments, or approve all assignments for a given HIT or HITType. Also allows you to approve a previously rejected assignment. This function spends money from your MTurk account.

Usage

ApproveAssignment(assignments, feedback = NULL, rejected = FALSE, 
                  verbose = getOption('MTurkR.verbose'), ...)

ApproveAllAssignments(hit = NULL, hit.type = NULL, feedback = NULL, 
                      verbose = getOption('MTurkR.verbose'), ...)

Arguments

assignments
A character string containing an AssignmentId, or a vector of multiple character strings containing multiple AssignmentIds, to approve.
hit
A character string containing a HITId all of whom's assignments are to be approved.
hit.type
A character string containing a HITTypeId (or a vector of HITTypeIds) all of whom's HITs' assignments are to be approved.
feedback
An optional character string containing any feedback for a worker. This must have length 1 or length equal to the number of workers. Maximum of 1024 characters. For ApproveAllAssignments, must be length 1.
rejected
A logical indicating whether the assignment(s) had previously been rejected (default FALSE). Approval of previously rejected assignments must be conducted separately from other approvals.
verbose
Optionally print the results of the API request to the standard output. Default is taken from getOption('MturkR.verbose').
...
Additional arguments passed to request.

Value

  • A dataframe containing the list of AssignmentIds, feedback (if any), and whether or not each approval request was valid.

Details

Approve assignments, by AssignmentId (as returned by GetAssignment or by HITId or HITTypeId. Must specify assignments xor hit xor hit.type. ApproveAllAssignments approves all assignments of a given HIT or HITType without first having to perform GetAssignment. ApproveAssignments() and approve() are aliases for ApproveAssignment. approveall() is an alias for ApproveAllAssignments.

References

http://docs.amazonwebservices.com/AWSMechTurk/latest/AWSMturkAPI/ApiReference_ApproveAssignmentOperation.html{API Reference: Approve Assignment} http://docs.amazonwebservices.com/AWSMechTurk/latest/AWSMturkAPI/ApiReference_ApproveRejectedAssignmentOperation.html{API Reference: Approve Rejected Assignment}

See Also

RejectAssignment

Examples

Run this code
a <- ApproveAssignment(assignments="26XXH0JPPSI23H54YVG7BKLEXAMPLE")

b <- ApproveAssignment(
assignments=c("26XXH0JPPSI23H54YVG7BKLEXAMPLE1","26XXH0JPPSI23H54YVG7BKLEXAMPLE2"),
feedback="Great work!")

c <- ApproveAllAssignments(hit="2MQB727M0IGF304GJ16S1F4VE3AYDQ")

d <- ApproveAllAssignments(hit.type="2FFNCWYB49F9BBJWA4SJUNST5OFSOW")

Run the code above in your browser using DataLab