我正在尝试从我之前使用MTurkR
R包发布的一批HIT中检索结果,并将其写入csv文件。我亲自在MTurkR
沙箱中完成了几个,但是当我使用GetAssignments
函数时会出现此错误:
a <- GetAssignments(hit.type = git_hit_type$HITTypeId, return.all = T)
Error in `[<-.data.frame`(`*tmp*`, "HITTypeId", value = "3FQBE1TSBOOM7YJ582RRD7RMUYDB6K") : replacement has 1 row, data has 0
我不确定这是否是由HTML文件提交HITS的方式引起的,或者我是否只是使用了错误的函数。任何帮助将不胜感激!
编辑:这是我的HTML代码,可能是问题的一部分:
<!DOCTYPE html>
<html>
<head>
<meta http-equiv='Content-Type' content='text/html; charset=UTF-8' />
<script type='text/javascript' src='https://s3.amazonaws.com/mturk- public/externalHIT_v1.js'></script>
<link href="https://s3.amazonaws.com/mturk-public/bs30/css/bootstrap.min.css" rel="stylesheet" />
</head>
<body>
<form name='mturk_form' method='post' id='mturk_form' action='https://workersandbox.mturk.com/mturk/externalSubmit'>
<input type='hidden' value='' name='assignmentId' id='assignmentId' />
<fieldset>
<p>Issue #${id}</p>
<p>Contents of the comment:</p>
<p>${comment}</p>
<p>Select all codes that apply to the comment:</p>
<div class="checkbox">
<p><input name="Answer" type="checkbox" value="VOT" />VOT: Voting</p>
<p><input name="Answer" type="checkbox" value="REF" />REF: Justifying action based on external artifacts or standards</p>
<p><input name="Answer" type="checkbox" value="DED" />DED: Developer Decisions</p>
<p><input name="Answer" type="checkbox" value="DNN" />DNN: Assuming no discourse necessary/p>
<p><input name="Answer" type="checkbox" value="RAS" />RAS: Rejection for administrative reasons</p>
<p><input name="Answer" type="checkbox" value="EFT" />EFT: Enforcing tests</p>
<p><input name="Answer" type="checkbox" value="MCD" />MCD: Making changes to documentation or tests</p>
<p><input name="Answer" type="checkbox" value="CDO" />CDO: A devloper offering opinion</p>
<p><input name="Answer" type="checkbox" value="IWO" />IWO: Inquiring into the work or options of others</p>
<p><input name="Answer" type="checkbox" value="CTH" />CTH: Casual theorizing</p>
<p><input name="Answer" type="checkbox" value="DPC" />DPC: Debating pros and cons of various solutions</p>
<p><input name="Answer" type="checkbox" value="CVP" />CVP: Cross-validating problems </p>
<p><input name="Answer" type="checkbox" value="SWC" />SWC: Suggesting different ways of changing a contribution</p>
<p><input name="Answer" type="checkbox" value="REC" />REC: Referring to external conversation</p>
</div>
</fieldset>
<p><input type='submit' id='submitButton' value='Submit' /></p>
</form>
<script language='Javascript'>turkSetAssignmentID();</script>
</body>
所以我的问题是,GetAssignments函数可能导致此错误(可能是我的html代码吗?),我该怎么做才能解决这个问题?谢谢!