ExpireHIT: Expire HIT

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

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

1
2
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, 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, otherwise all HITs are returned in HITStatus.

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

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 reactivated by adding additional time to its expiration using ExtendHIT.

expire() is an alias.

Value

A data frame containing the HITId(s) and whether each expiration request was valid.

Author(s)

Thomas J. Leeper

References

API Reference

See Also

CreateHIT

ExtendHIT

DisableHIT

DisposeHIT

Examples

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
## Not run: 
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;")

## End(Not run)

cloudyr/MTurkR documentation built on June 4, 2019, 3:30 p.m.