Learn R Programming

MTurkR (version 0.2)

XMLToDataFrame: Parse MTurk XML Responses and Convert to Dataframe

Description

Parse MTurk XML Responses of specified types and convert the XML to an R dataframe.

Usage

AssignmentsToDataFrame(xml = NULL, xml.parsed = NULL, return.assignment.xml = FALSE)
BonusPaymentsToDataFrame(xml = NULL, xml.parsed = NULL)
ExternalQuestionToDataFrame(xml = NULL, xml.parsed = NULL)
HITsToDataFrame(xml = NULL, xml.parsed = NULL, return.hit.xml = FALSE, return.qual.list = TRUE)
HTMLQuestionToDataFrame(xml = NULL, xml.parsed = NULL)
QualificationRequestsToDataFrame(xml = NULL, xml.parsed = NULL)
QualificationRequirementsToDataFrame(	xml = NULL, xml.parsed = NULL, xmlnodeset = NULL,
										hit = NULL, hit.number = NULL)
QualificationsToDataFrame(xml = NULL, xml.parsed = NULL)
QualificationTypesToDataFrame(xml = NULL, xml.parsed = NULL)
QuestionFormAnswersToDataFrame(xml = NULL, xml.parsed = NULL)
QuestionFormToDataFrame(xml = NULL, xml.parsed = NULL)
ReviewResultsToDataFrame(xml = NULL, xml.parsed = NULL)
WorkerBlockToDataFrame(xml = NULL, xml.parsed = NULL)

Arguments

xml
A character string containing a full MTurk XML response. Must specify this or the xml.parsed parameter.
xml.parsed
A full MTurk XML response parsed by the xmlParse. Must specify this or the xml parameter.
xmlnodeset
An XML nodeset.
return.assignment.xml
A logical indicating whether workers' responses to HIT questions should be returned.
return.hit.xml
A logical indicating whether the HIT XML should be returned. Default is FALSE.
return.qual.list
A logical indicating whether the QualificationRequirement list should be returned. Default is TRUE.
hit
An optional parameter included for advanced users, to return only one of the specified HITs.
hit.number
An optional parameter included for advanced users, to return only one of the specified HITs.

Value

  • A dataframe (or list of dataframes, in some cases) containing the request data.

Details

Mostly internal functions to convert XML-formatted MTurk responses into more useful R dataframes. These are mostly internal to the extent that most users will never call them directly, but they may be useful if one needs to examine information stored in the MTurkR log file, or if genericmturkr is used.

References

http://docs.amazonwebservices.com/AWSMechTurk/latest/AWSMturkAPI/ApiReference_DataStructuresArticle.html{API Reference: Data Structures}