GetAssignment: Get Assignment(s)

GetAssignmentR Documentation

Get Assignment(s)

Description

Get an assignment or multiple assignments for one or more HITs (or a HITType) as a data frame.

Usage

GetAssignment(
  assignment = NULL,
  hit = NULL,
  hit.type = NULL,
  annotation = NULL,
  status = NULL,
  results = as.integer(100),
  pagetoken = NULL,
  get.answers = FALSE,
  persist.on.error = FALSE,
  verbose = getOption("pyMTurkR.verbose", TRUE)
)

Arguments

assignment

An optional character string specifying the AssignmentId of an assignment to return. Must specify assignment xor hit xor hit.type xor annotation.

hit

An optional character string specifying the HITId whose assignments are to be returned, or a vector of character strings specifying multiple HITIds all of whose assignments are to be returned. Must specify assignment xor hit xor hit.type xor annotation.

hit.type

An optional character string specifying the HITTypeId (or a vector of HITTypeIds) of one or more HITs whose assignments are to be returned. Must specify assignment xor 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 retrieve all assignments for 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 assignment xor hit xor hit.type xor annotation.

status

An optional vector of character strings (containing one of more of “Approved”,“Rejected”,“Submitted”), specifying whether only a subset of assignments should be returned. If NULL, all assignments are returned (the default). Only applies when hit or hit.type are specified; ignored otherwise.

results

An optional character string indicating how many results to fetch per page. Must be between 1 and 100. Most users can ignore this.

pagetoken

An optional character string indicating which page of search results to start at. Most users can ignore this.

get.answers

An optional logical indicating whether to also get the answers. If TRUE, the returned object is a list with Assignments and Answers.

persist.on.error

A boolean specifying whether to persist on an error. Errors can sometimes happen when the server times-out, in cases where large numbers of Assignments are being retrieved.

verbose

Optionally print the results of the API request to the standard output. Default is taken from getOption('pyMTurkR.verbose', TRUE).

Details

This function returns the requested assignments. The function must specify an AssignmentId xor a HITId xor a HITTypeId. If an AssignmentId is specified, only that assignment is returned. If a HIT or HITType is specified, default behavior is to return all assignments through a series of sequential (but invisible) API calls meaning that returning large numbers of assignments (or assignments for a large number of HITs in a single request) may be time consuming.

GetAssignments(), assignment(), assignments(), and ListAssignmentsForHIT() are aliases.

Value

A data frame representing an assignment or multiple assignments for one or more HITs (or a HITType).

Author(s)

Tyler Burleigh, Thomas J. Leeper

References

API Reference: GetAssignment

API Reference: ListAssignmentsForHIT

Examples


## Not run: 
# get an assignment
GetAssignment(assignments = "26XXH0JPPSI23H54YVG7BKLEXAMPLE")
# get all assignments for a HIT
GetAssignment(hit = "2MQB727M0IGF304GJ16S1F4VE3AYDQ")
# get all assignments for a HITType
GetAssignment(hit.type = "2FFNCWYB49F9BBJWA4SJUNST5OFSOW")
# get all assignments for an online batch from the RUI
GetAssignment(annotation="BatchId:78382;")

## End(Not run)


cloudyr/pyMTurkR documentation built on April 7, 2024, 12:07 p.m.