ChangeHITType: Change HITType Properties of a HIT

ChangeHITTypeR Documentation

Change HITType Properties of a HIT

Description

Change the HITType of a HIT from one HITType to another (e.g., to change the title, description, or qualification requirements associated with a HIT). 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. You cannot 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 = as.integer(2592000),
  qual.req = NULL,
  old.annotation = NULL,
  verbose = getOption("pyMTurkR.verbose", TRUE)
)

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. Must specify hit xor old.hit.type xor annotation.

old.hit.type

An optional character string containing the HITTypeId (or a vector of HITTypeIds) whose HITs are to be changed to the new HITTypeId. Must specify hit xor old.hit.type xor annotation.

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.

old.annotation

An optional character string specifying the value of the RequesterAnnotation field for a batch of HITs to change the HITType of. This can be used to change the HITType 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 hit xor old.hit.type xor annotation.

verbose

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

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() and UpdateHITTypeOfHIT() are aliases.

Value

A data frame 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.

Author(s)

Tyler Burleigh, Thomas J. Leeper

References

API Reference

See Also

CreateHIT

RegisterHITType

Examples


## Not run: 
hittype1 <- 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("https://www.example.com/", "400")
hit <- CreateHIT(hit.type = hittype1$HITTypeId,
                 assignments = 1,
                 expiration = seconds(days=1),
                 question = a$string)

# change to HITType with new reward amount
hittype2 <- RegisterHITType(title = "10 Question Survey",
                description = "Complete a 10-question survey about news coverage and your opinions",
                reward = ".45",
                duration = seconds(hours=1),
                keywords = "survey, questionnaire, politics")
ChangeHITType(hit = hit$HITId,
              new.hit.type=hittype2$HITTypeId)

# Change to new HITType, with arguments stated atomically
ChangeHITType(hit = hit$HITId,
              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")

# expire and dispose HIT
ExpireHIT(hit = hit$HITId)
DeleteHIT(hit = hit$HITId)

## End(Not run)


pyMTurkR documentation built on May 29, 2024, 6:13 a.m.