Learn R Programming

MTurkR (version 0.6.17)

DisposeHIT: Dispose HIT

Description

Dispose of a HIT that is no longer needed. You can only dispose of HITs that are Reviewable, with all assignments either approved or rejected.

Usage

DisposeHIT(hit = NULL, hit.type = NULL, annotation = NULL,
           response.group = NULL, 
           verbose = getOption('MTurkR.verbose', TRUE), ...)

Arguments

hit
A character string containing a HITId or a vector of character strings containing multiple HITIds. Must specify hit xor hit.type xor annotation.
hit.type
An optional character string containing a HITTypeId (or a vector of HITTypeIds). 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 dispose of all HITs from a batch created in the online Requester User Interface (RUI). To use a batch
response.group
An optional character string specifying what details of each HIT to return of: Minimal, HITQuestion, HITDetail, HITAssignmentSummary. For more information, see http://docs.aws.amazo
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 dataframe containing a list of HITs and whether the request to dispose of each of them was valid.

Details

Dispose of a HIT (and its assignment data) when it is no longer needed. Must specify a HITId or a HITTypeId, but not both. HITTypeId uses the SearchHITs operation to locate HITs of the specified HITType before disposing of them. disposehit() is an alias.

References

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

See Also

CreateHIT ExtendHIT ExpireHIT DisableHIT

Examples

Run this code
# Dispose a single HIT
b <- GenerateExternalQuestion("http://www.example.com/","400")
hit1 <- 
CreateHIT(hit.type = "2FFNCWYB49F9BBJWA4SJUNST5OFSOW", 
          expiration = seconds(days = 1),
          question=b$string)
ExpireHIT(hit1$HITId) # must be expired before disposing
DiposeHIT(hit1$HITId)

# Dispose all HITs of a given HITType
DisposeHIT(hit.type = hit1$HITTypeId)

# Dispose all HITs of a given batch from the RUI
DisposeHIT(annotation="BatchId:78382;")

Run the code above in your browser using DataLab