ExtendHIT: Extend HIT

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

Description

Extend the time remaining on a HIT or the number of assignments available for the HIT.

Usage

1
2
3
ExtendHIT(hit = NULL, hit.type = NULL, annotation = NULL,
          add.assignments = NULL, add.seconds = NULL, 
          unique.request.token = NULL, verbose = getOption('MTurkR.verbose', TRUE), ...)

Arguments

hit

An optional 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 extend 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.

add.assignments

An optional character string containing the number of assignments to add to the HIT. Must be between 1 and 1000000000.

add.seconds

An optional character string containing the amount of time to extend the HIT, in seconds (for example, returned by seconds). Must be between 1 hour (3600 seconds) and 365 days.

unique.request.token

An optional character string, included only for advanced users.

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 useful function for adding time and/or additional assignments to a HIT. If the HIT is already expired, this reactivates the HIT for the specified amount of time. If all assignments have already been submitted, this reactivates the HIT with the specified number of assignments and previously specified expiration. Must specify a HITId xor a HITTypeId. If multiple HITs or a HITTypeId are specified, each HIT is extended by the specified amount.

extend() is an alias.

Value

A data frame containing the HITId, assignment increment, time increment, and whether each extension request was valid.

Author(s)

Thomas J. Leeper

References

API Reference

See Also

CreateHIT

ExpireHIT

DisableHIT

DisposeHIT

Examples

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
## Not run: 
a <- GenerateExternalQuestion("https://www.example.com/","400")
hit1 <- CreateHIT(title = "Example",
                  description = "Simple Example HIT",
                  reward = ".01",
                  expiration = seconds(days = 4),
                  duration = seconds(hours = 1),
                  keywords = "example",
                  question = a$string)

# add assignments
ExtendHIT(hit = hit1$HITId, add.assignments = "20")

# add time
ExtendHIT(hit = hit1$HITId, add.seconds = seconds(days=1)))

# add assignments and time
ExtendHIT(hit = hit1$HITId, add.assignments = "20", add.seconds = seconds(days=1)))

# cleanup
DisableHIT(hit = hit1$HITId)


## End(Not run)
## Not run: 
# Extend all HITs of a given batch from the RUI
ExtendHIT(annotation="BatchId:78382;", add.assignments = "20")

## End(Not run)

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