Learn R Programming

MTurkR (version 0.6.17)

ExpireHIT: Expire HIT

Description

Force a HIT to expire immediately, as opposed to at its prespecified expiration time. Expired HITs can be extended with the ExtendHIT operation.

Usage

ExpireHIT(hit = NULL, hit.type = NULL, annotation = 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, otherwise all HITs are returned in HITStatus.
hit.type
An optional character string containing a HITTypeId (or a vector of HITTypeIds). Must specify hit xor hit.type xor annotation, otherwise all HITs are returned in HITStatus.
annotation
An optional character string specifying the value of the RequesterAnnotation field for a batch of HITs. This can be used to expire all HITs from a batch created in the online Requester User Interface (RUI). To use a batch ID,
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 the HITId(s) and whether each expiration request was valid.

Details

A function to (prematurely) expire a HIT (or multiple HITs), thereby preventing any additional assignments from being completed. Pending assignments can still be submitted. An expired HIT can be reactived by adding additional time to its expiration using ExtendHIT. expire() is an alias.

References

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

See Also

CreateHIT ExtendHIT DisableHIT DisposeHIT

Examples

Run this code
a <- GenerateExternalQuestion("http://www.example.com/","400")
hit1 <- 
CreateHIT(hit.type="2FFNCWYB49F9BBJWA4SJUNST5OFSOW", question = a$string)

# expire HIT
ExpireHIT(hit = hit1$HITId)

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

Run the code above in your browser using DataLab