DisableHIT: Disable HIT

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

Description

Disabling a HIT is probably not what you want to do. DisableHIT automatically removes the HIT from the MTurk server, approves (and thus pays for) all submitted and pending assignments, and then permanently deletes all assignment data.

Usage

1
2
3
DisableHIT(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 disable 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.

response.group

An optional character string specifying what details of each HIT to return of: “Minimal”, “HITQuestion”, “HITDetail”, “HITAssignmentSummary”. For more information, see Common Parameters and HIT Data Structure.

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

Disable a HIT (and its assignment data). This is a somewhat risky function because it automatically approves all pending assignments and then disposes of everything. DisposeHIT is probably what most users will use to delete HIT and assignment data that is no longer needed.

disable() is an alias.

Value

A data frame containing a list of HITs and whether the request to disable each of them was valid.

Author(s)

Thomas J. Leeper

References

API Reference

See Also

CreateHIT

ExtendHIT

ExpireHIT

DisposeHIT

Examples

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
15
## Not run: 
# Disable a single HIT
b <- GenerateExternalQuestion("http://www.example.com/","400")
hit1 <- CreateHIT(hit.type="2FFNCWYB49F9BBJWA4SJUNST5OFSOW", 
                  expiration = seconds(days = 1),
                  question=b$string)
DisableHIT(hit = hit1$HITId)

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

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

## End(Not run)

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