Learn R Programming

MTurkR (version 0.2)

ChangeHITType: Change HITType of a HIT

Description

Change the HITType of a HIT from one HITType to another. This will cause a HIT to no longer be grouped with HITs of the previous HITType and instead be grouped with those of the new HITType. This also allows you to change the payment associated with a HIT without expiring the current HIT and creating a new one.

Usage

ChangeHITType(	hit = NULL, old.hit.type = NULL, new.hit.type = NULL, 
				title = NULL, description = NULL, reward = NULL, duration = NULL, keywords = NULL, 
				auto.approval.delay = NULL, qual.req = NULL, 
				keypair = credentials(), print = TRUE, browser = FALSE, 
				log.requests = TRUE, sandbox = FALSE)

Arguments

hit
An optional character string containing the HITId whose HITTypeId is to be changed, or a vector of character strings containing each of multiple HITIds to be changed.
old.hit.type
An optional character string containing the HITTypeId whose HITs are to be changed to the new HITTypeId.
new.hit.type
An optional character string specifying the new HITTypeId that this HIT should be visibly grouped with (and whose properties, e.g. reward amount, this HIT should inherit).
title
An optional character string containing the title for the HITType. All HITs of this HITType will be visibly grouped to workers according to this title.
description
An optional character string containing a description of the HITType. This is visible to workers.
reward
An optional character string containing the per-assignment reward amount, in U.S. Dollars (e.g., 0.15).
duration
An optional character string containing the duration of each HIT, in seconds (for example, as returned by seconds).
keywords
An optional character string containing a comma-separated set of keywords by which workers can search for HITs of this HITType.
auto.approval.delay
An optional character string specifying the amount of time, in seconds (for example, as returned by seconds), before a submitted assignment is automatically granted.
qual.req
An optional character string containing one a QualificationRequirement data structure, as returned by GenerateQualificationRequirement.
keypair
A two-item character vector containing an AWS Access Key ID in the first position and the corresponding Secret Access Key in the second position. Set default with credentials.
print
Optionally print the results of the API request to the standard output. Default is TRUE.
browser
Optionally open the request in the default web browser, rather than opening in R. Default is FALSE.
log.requests
A logical specifying whether API requests should be logged. Default is TRUE. See readlogfile for details.
sandbox
Optionally execute the request in the MTurk sandbox rather than the live server. Default is FALSE.

Value

  • A dataframe listing the HITId of each HIT who HITType was changed, its old HITTypeId and new HITTypeId, and whether the request for each HIT was valid.

Details

This function changes the HITType of a specified HIT (or multiple specific HITs or all HITs of a specified HITType) to a new HITType. hit xor old.hit.type must be specified. Then, either a new HITTypeId can be specified or a new HITType can be created by atomically by specifying the characteristics of the new HITType. changehittype() is an alias.

References

http://docs.amazonwebservices.com/AWSMechTurk/latest/AWSMturkAPI/ApiReference_ChangeHITTypeOfHITOperation.html{API Reference}

See Also

CreateHIT RegisterHITType

Examples

Run this code
ChangeHITType(hit="2MQB727M0IGF304GJ16S1F4VE3AYDQ",new.hit.type="2KAVWAVKI62N29TGK5Q9FQH6BRJQIY")
ChangeHITType(old.hit.type="2FFNCWYB49F9BBJWA4SJUNST5OFSOW",new.hit.type="2KAVWAVKI62N29TGK5Q9FQH6BRJQIY")
ChangeHITType(hit="2MQB727M0IGF304GJ16S1F4VE3AYDQ",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")

Run the code above in your browser using DataLab