MTAssembleHITHTML: Assemble HIT HTML

Description Usage Arguments

View source: R/MTAssembleHITHTML.R

Description

Function to assemble HIT HTML into a single file, ready to upload to MTurk.

Usage

1
2
3
4
MTAssembleHITHTML(inputLoc = "input", content = "import",
  innerHTML.html = "import", innerScript.js = "import",
  hitShell.html = "import", button = "hit", 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.

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.

button

Specifies which submit button configuration to use: "hit", "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.