GetHIT: Get HIT

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

Description

Retrieve various details of a HIT as a data frame. What details are returned depend upon the requested ResponseGroup.

Usage

1
2
3
4
5
6
GetHIT(hit, response.group = NULL,
       return.hit.dataframe = TRUE, return.qual.dataframe = TRUE,
       verbose = getOption('MTurkR.verbose', TRUE), ...)

HITStatus(hit = NULL, hit.type = NULL, annotation = NULL,
          verbose = getOption('MTurkR.verbose', TRUE), ...)

Arguments

hit

An optional character string specifying the HITId of the HIT to be retrieved. Must specify hit xor hit.type xor annotation.

hit.type

An optional character string specifying the HITTypeId (or a vector of HITTypeIds) of the HIT(s) to be retrieved. 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 retrieve 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.

response.group

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

return.hit.dataframe

A logical indicating whether the data frame of HITs should be returned. Default is TRUE.

return.qual.dataframe

A logical indicating whether the list of each HIT's QualificationRequirements (stored as data frames in that list) should be returned. Default is TRUE.

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

GetHIT retrieves characteristics of a HIT. HITStatus is a wrapper that retrieves the Number of Assignments Pending, Number of Assignments Available, Number of Assignments Completed for the HIT(s), which is helpful for checking on the progress of currently available HITs. Specifying a hit.type causes the function to first search for available HITs of that HITType, then return the requested information for each HIT.

gethit() and hit() are aliases for GetHIT. status() is an alias for HITStatus.

Value

Optionally a one- or two-element list containing a data frame of HIT details and, optionally, a list of each HIT's QualificationRequirements (stored as data frames in that list in the order that HITs were retrieved.).

Author(s)

Thomas J. Leeper

References

API Reference

See Also

GetHITsForQualificationType

GetReviewableHITs

SearchHITs

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
## Not run: 
# register HITType
hittype <- 
RegisterHITType(title="10 Question Survey",
                description=
                "Complete a 10-question survey about news coverage and your opinions",
                reward=".20", 
                duration=seconds(hours=1), 
                keywords="survey, questionnaire, politics")

a <- GenerateExternalQuestion("http://www.example.com/","400")
hit1 <- 
CreateHIT(hit.type = hittype$HITTypeId, question = a$string)

GetHIT(hit1$HITId)
HITStatus(hit1$HITId)

# cleanup
DisableHIT(hit1$HITId)

## End(Not run)
## Not run: 
# Get the status of all HITs from a given batch from the RUI
HITStatus(annotation="BatchId:78382;")

## End(Not run)

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