ApproveAssignment: Approve Assignment(s)

Description Usage Arguments Details Value Author(s) References See Also Examples

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

1
2
3
4
5
6
ApproveAssignment(assignments, feedback = NULL, rejected = FALSE, 
                  verbose = getOption('MTurkR.verbose', TRUE), ...)

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

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 whose assignments are to be approved. Must specify hit xor hit.type xor annotation.

hit.type

A character string containing a HITTypeId (or a vector of HITTypeIds) all of whose HITs' assignments are to be approved. Must specify hit xor hit.type xor annotation.

annotation

An optional character string specifying the value of the RequesterAnnotation field for a batch of HITs. This can be used to approve all assignments for all HITs from a “batch” created in the online Requester User Interface (RUI). To use a batch ID, the batch must be written in a character string of the form “BatchId:78382;”, where “73832” is the batch ID shown in the RUI. Must specify hit xor hit.type xor annotation.

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', TRUE).

...

Additional arguments passed to request.

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.

Value

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

Author(s)

Thomas J. Leeper

References

API Reference: Approve Assignment

API Reference: Approve Rejected Assignment

See Also

RejectAssignment

Examples

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
15
16
17
18
## Not run: 
# Approve one assignment
ApproveAssignment(assignments = "26XXH0JPPSI23H54YVG7BKLEXAMPLE")

# Approve multiple assignments with the same feedback
ApproveAssignment(assignments = c("26XXH0JPPSI23H54YVG7BKLEXAMPLE1",
                                  "26XXH0JPPSI23H54YVG7BKLEXAMPLE2"),
                  feedback = "Great work!")


# Approve all assignments for a given HIT
ApproveAllAssignments(hit = "2MQB727M0IGF304GJ16S1F4VE3AYDQ")
# Approve all assignments for a given HITType
ApproveAllAssignments(hit.type = "2FFNCWYB49F9BBJWA4SJUNST5OFSOW")
# Approve all assignments for a given batch from the RUI
ApproveAllAssignments(annotation="BatchId:78382;")

## End(Not run)

leeper/MTurkR documentation built on June 6, 2019, 7:38 a.m.