MTAssembleHoneyHTML: Assemble Honey Pot HIT HTML

Description Usage Arguments

View source: R/MTAssembleHoneyHTML.R

Description

Function to assemble Honey Pot HIT HTML into a single file, ready to upload to MTurk. This is useful for supplying feedback in realtime. To use Honey Pots without feedback, just construct a normal HIT and evaluate answers on the backend.

Usage

1
2
3
4
5
MTAssembleHoneyHTML(inputLoc = "input", content = "import",
  honeyVars = NULL, innerHTML.html = "import", innerScript.js = "import",
  hitShell.html = "import", honeyScript = TRUE, button = "honey",
  skipPattern = NULL, write.to = "console", quiet = TRUE,
  sandbox = TRUE)

Arguments

inputLoc

Location where input files are. Default is "input", which simply points to a subdirectory of the working directory called 'input'.

content

Content to be parsed into the HTML. The columns of Content will be matched to parameterized ${parameter} in the input files. Input can be named matrix/data.frame, or a tab-delimited file. If "import", the function will look for a file called "content.tab" in the inputLoc file location. A different file can be specified by passing file(filename) into the function. Content should also include answers for honey pots, as well as a justification.

honeyVars

A string or vector of strings defining what variables that answers should be checked against.

innerHTML.html

The HTML that is common to HITs, honey pots, and examples. Typically includes content placeholders and questions. If "import", the function will look for a file called "innerHTML.html" in the inputLoc file location. Other files can be specified as above.

innerScript.js

JavaScript that should be included with every HIT, Example, or Honey Pot. If "import", the function will look for a file called 'innerScript.js'. Other files can be specified as above.

hitShell.html

If "import", function will look for a file called hitShell.html in the inputLoc file. Other files can be specified as above.

honeyScript

Logical. If FALSE, will create a file useful for 'examples' (e.g., checks answers, but is not meant for posting on MTurk).

button

Specifies which submit button configuration to use: "honey" or "example".

skipPattern

A matrix or list of matrices containing two columns: the input name from the HTML, and the condition value. The first row represents the condition that will trigger the skipPattern, and the subsequent rows provide the values to be applied to the skipped inputs.

write.to

String. If "console", output will print in console or be available to be assigned to an object. Otherwise, the function will assume it is a file name.

quiet

Logical. If TRUE, additional warnings will be silenced.

sandbox

Logical. Defines whether the HTML should be prepared for sandbox or live.


andrewbrownphd/MetaTurkR documentation built on Nov. 23, 2019, 4:17 p.m.