XMLToDataFrame: Parse MTurk XML to Data Frame

Description Usage Arguments Details Value Author(s) References

Description

Parse MTurk XML Responses to R data.frames.

Usage

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
15
16
17
18
19
20
21
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.

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.

Value

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

Author(s)

Thomas J. Leeper

References

API Reference: Data Structures


leeper/MTurkR documentation built on April 3, 2018, 5:27 p.m.