Learn R Programming

MTurkR (version 0.8.0)

XML: Parse MTurk XML to Data Frame

Description

Parse MTurk XML Responses to R data.frames.

Usage

as.data.frame.AnswerKey(xml.parsed)
as.data.frame.Assignments(xml.parsed, 
                          return.assignment.xml = FALSE)
as.data.frame.BonusPayments(xml.parsed)
as.data.frame.ExternalQuestion(xml.parsed)
as.data.frame.HITs(xml.parsed, 
                   return.hit.xml = FALSE,
                   return.qual.list = TRUE, 
                   sandbox = getOption('MTurkR.sandbox'))
as.data.frame.HTMLQuestion(xml.parsed)
as.data.frame.QualificationRequests(xml.parsed)
as.data.frame.QualificationRequirements(xml.parsed = NULL, 
                                        xmlnodeset = NULL,
                                        hit.number = NULL,
                                        sandbox = getOption('MTurkR.sandbox'))
as.data.frame.Qualifications(xml.parsed)
as.data.frame.QualificationTypes(xml.parsed)
as.data.frame.QuestionFormAnswers(xml.parsed)
as.data.frame.QuestionForm(xml.parsed)
as.data.frame.ReviewResults(xml.parsed)
as.data.frame.WorkerBlock(xml.parsed)

Arguments

xml.parsed

A full MTurk XML response parsed by the xmlParse.

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.

sandbox

A logical indicating whether GetQualificationType, called internally, should query the sandbox for user-defined QualificationTypes.

Value

A data frame (or list of data frames, in some cases) containing the request data.

Details

Mostly internal functions to convert XML-formatted MTurk responses into more useful R data frames. 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 request is used directly.

References

API Reference: Data Structures