{"action":"closed","number":1,"pull_request":{"url":"https://api.github.com/repos/jonchang/MTurkR/pulls/1","id":31165694,"html_url":"https://github.com/jonchang/MTurkR/pull/1","diff_url":"https://github.com/jonchang/MTurkR/pull/1.diff","patch_url":"https://github.com/jonchang/MTurkR/pull/1.patch","issue_url":"https://api.github.com/repos/jonchang/MTurkR/issues/1","number":1,"state":"closed","locked":false,"title":"Remove check for number of template variables","user":{"login":"jonchang","id":213484,"avatar_url":"https://avatars.githubusercontent.com/u/213484?v=3","gravatar_id":"","url":"https://api.github.com/users/jonchang","html_url":"https://github.com/jonchang","followers_url":"https://api.github.com/users/jonchang/followers","following_url":"https://api.github.com/users/jonchang/following{/other_user}","gists_url":"https://api.github.com/users/jonchang/gists{/gist_id}","starred_url":"https://api.github.com/users/jonchang/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/jonchang/subscriptions","organizations_url":"https://api.github.com/users/jonchang/orgs","repos_url":"https://api.github.com/users/jonchang/repos","events_url":"https://api.github.com/users/jonchang/events{/privacy}","received_events_url":"https://api.github.com/users/jonchang/received_events","type":"User","site_admin":false},"body":"This code (removed in 8bf3b34) makes two incorrect assumptions - that there is a 1 to 1 mapping of input variables and that each template variable occurs only once on each line.\r\n\r\nThis works: (from examples)\r\n\r\n```r\r\ntemp <- system.file(\"templates/htmlquestion2.xml\", package = \"MTurkR\")\r\n\r\na <- data.frame(hittitle = c(\"HIT title 1\",\"HIT title 2\",\"HIT title 3\"),\r\n                hitvariable = c(\"HIT text 1\",\"HIT text 2\",\"HIT text 3\"), \r\n                stringsAsFactors=FALSE)\r\n\r\ntemps <- GenerateHITsFromTemplate(template = temp, input = a)\r\n## works\r\n```\r\n\r\nThis doesn't work (but should):\r\n\r\n```r\r\ntemp_string <- paste(readLines(temp), collapse=\"\")\r\ntemps <- GenerateHITsFromTemplate(template = temp_string, input = a)\r\n```\r\n\r\n74ea23f also fixes the template XML to match the example in [GenerateHITsFromTemplate.Rd](https://github.com/leeper/MTurkR/blob/master/man/GenerateHITsFromTemplate.Rd).","created_at":"2015-03-13T21:32:03Z","updated_at":"2015-03-13T21:32:51Z","closed_at":"2015-03-13T21:32:51Z","merged_at":null,"merge_commit_sha":"c0f63ec2882f90e2fd822b5b91013c153a2bf512","assignee":null,"milestone":null,"commits_url":"https://api.github.com/repos/jonchang/MTurkR/pulls/1/commits","review_comments_url":"https://api.github.com/repos/jonchang/MTurkR/pulls/1/comments","review_comment_url":"https://api.github.com/repos/jonchang/MTurkR/pulls/comments{/number}","comments_url":"https://api.github.com/repos/jonchang/MTurkR/issues/1/comments","statuses_url":"https://api.github.com/repos/jonchang/MTurkR/statuses/74ea23f7af0c502a39f05dcc62e32d49bfaccfed","head":{"label":"jonchang:template-variables","ref":"template-variables","sha":"74ea23f7af0c502a39f05dcc62e32d49bfaccfed","user":{"login":"jonchang","id":213484,"avatar_url":"https://avatars.githubusercontent.com/u/213484?v=3","gravatar_id":"","url":"https://api.github.com/users/jonchang","html_url":"https://github.com/jonchang","followers_url":"https://api.github.com/users/jonchang/followers","following_url":"https://api.github.com/users/jonchang/following{/other_user}","gists_url":"https://api.github.com/users/jonchang/gists{/gist_id}","starred_url":"https://api.github.com/users/jonchang/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/jonchang/subscriptions","organizations_url":"https://api.github.com/users/jonchang/orgs","repos_url":"https://api.github.com/users/jonchang/repos","events_url":"https://api.github.com/users/jonchang/events{/privacy}","received_events_url":"https://api.github.com/users/jonchang/received_events","type":"User","site_admin":false},"repo":{"id":32180929,"name":"MTurkR","full_name":"jonchang/MTurkR","owner":{"login":"jonchang","id":213484,"avatar_url":"https://avatars.githubusercontent.com/u/213484?v=3","gravatar_id":"","url":"https://api.github.com/users/jonchang","html_url":"https://github.com/jonchang","followers_url":"https://api.github.com/users/jonchang/followers","following_url":"https://api.github.com/users/jonchang/following{/other_user}","gists_url":"https://api.github.com/users/jonchang/gists{/gist_id}","starred_url":"https://api.github.com/users/jonchang/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/jonchang/subscriptions","organizations_url":"https://api.github.com/users/jonchang/orgs","repos_url":"https://api.github.com/users/jonchang/repos","events_url":"https://api.github.com/users/jonchang/events{/privacy}","received_events_url":"https://api.github.com/users/jonchang/received_events","type":"User","site_admin":false},"private":false,"html_url":"https://github.com/jonchang/MTurkR","description":"R Client for the MTurk Requester API","fork":true,"url":"https://api.github.com/repos/jonchang/MTurkR","forks_url":"https://api.github.com/repos/jonchang/MTurkR/forks","keys_url":"https://api.github.com/repos/jonchang/MTurkR/keys{/key_id}","collaborators_url":"https://api.github.com/repos/jonchang/MTurkR/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/jonchang/MTurkR/teams","hooks_url":"https://api.github.com/repos/jonchang/MTurkR/hooks","issue_events_url":"https://api.github.com/repos/jonchang/MTurkR/issues/events{/number}","events_url":"https://api.github.com/repos/jonchang/MTurkR/events","assignees_url":"https://api.github.com/repos/jonchang/MTurkR/assignees{/user}","branches_url":"https://api.github.com/repos/jonchang/MTurkR/branches{/branch}","tags_url":"https://api.github.com/repos/jonchang/MTurkR/tags","blobs_url":"https://api.github.com/repos/jonchang/MTurkR/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/jonchang/MTurkR/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/jonchang/MTurkR/git/refs{/sha}","trees_url":"https://api.github.com/repos/jonchang/MTurkR/git/trees{/sha}","statuses_url":"https://api.github.com/repos/jonchang/MTurkR/statuses/{sha}","languages_url":"https://api.github.com/repos/jonchang/MTurkR/languages","stargazers_url":"https://api.github.com/repos/jonchang/MTurkR/stargazers","contributors_url":"https://api.github.com/repos/jonchang/MTurkR/contributors","subscribers_url":"https://api.github.com/repos/jonchang/MTurkR/subscribers","subscription_url":"https://api.github.com/repos/jonchang/MTurkR/subscription","commits_url":"https://api.github.com/repos/jonchang/MTurkR/commits{/sha}","git_commits_url":"https://api.github.com/repos/jonchang/MTurkR/git/commits{/sha}","comments_url":"https://api.github.com/repos/jonchang/MTurkR/comments{/number}","issue_comment_url":"https://api.github.com/repos/jonchang/MTurkR/issues/comments{/number}","contents_url":"https://api.github.com/repos/jonchang/MTurkR/contents/{+path}","compare_url":"https://api.github.com/repos/jonchang/MTurkR/compare/{base}...{head}","merges_url":"https://api.github.com/repos/jonchang/MTurkR/merges","archive_url":"https://api.github.com/repos/jonchang/MTurkR/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/jonchang/MTurkR/downloads","issues_url":"https://api.github.com/repos/jonchang/MTurkR/issues{/number}","pulls_url":"https://api.github.com/repos/jonchang/MTurkR/pulls{/number}","milestones_url":"https://api.github.com/repos/jonchang/MTurkR/milestones{/number}","notifications_url":"https://api.github.com/repos/jonchang/MTurkR/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/jonchang/MTurkR/labels{/name}","releases_url":"https://api.github.com/repos/jonchang/MTurkR/releases{/id}","created_at":"2015-03-13T21:06:07Z","updated_at":"2015-03-13T21:06:08Z","pushed_at":"2015-03-13T21:29:54Z","git_url":"git://github.com/jonchang/MTurkR.git","ssh_url":"git@github.com:jonchang/MTurkR.git","clone_url":"https://github.com/jonchang/MTurkR.git","svn_url":"https://github.com/jonchang/MTurkR","homepage":"http://cran.r-project.org/web/packages/MTurkR/index.html","size":1691,"stargazers_count":0,"watchers_count":0,"language":"R","has_issues":false,"has_downloads":true,"has_wiki":true,"has_pages":true,"forks_count":0,"mirror_url":null,"open_issues_count":0,"forks":0,"open_issues":0,"watchers":0,"default_branch":"master"}},"base":{"label":"jonchang:master","ref":"master","sha":"56b3dd735c4505bd44c0c2084f6f8935135b7bc0","user":{"login":"jonchang","id":213484,"avatar_url":"https://avatars.githubusercontent.com/u/213484?v=3","gravatar_id":"","url":"https://api.github.com/users/jonchang","html_url":"https://github.com/jonchang","followers_url":"https://api.github.com/users/jonchang/followers","following_url":"https://api.github.com/users/jonchang/following{/other_user}","gists_url":"https://api.github.com/users/jonchang/gists{/gist_id}","starred_url":"https://api.github.com/users/jonchang/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/jonchang/subscriptions","organizations_url":"https://api.github.com/users/jonchang/orgs","repos_url":"https://api.github.com/users/jonchang/repos","events_url":"https://api.github.com/users/jonchang/events{/privacy}","received_events_url":"https://api.github.com/users/jonchang/received_events","type":"User","site_admin":false},"repo":{"id":32180929,"name":"MTurkR","full_name":"jonchang/MTurkR","owner":{"login":"jonchang","id":213484,"avatar_url":"https://avatars.githubusercontent.com/u/213484?v=3","gravatar_id":"","url":"https://api.github.com/users/jonchang","html_url":"https://github.com/jonchang","followers_url":"https://api.github.com/users/jonchang/followers","following_url":"https://api.github.com/users/jonchang/following{/other_user}","gists_url":"https://api.github.com/users/jonchang/gists{/gist_id}","starred_url":"https://api.github.com/users/jonchang/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/jonchang/subscriptions","organizations_url":"https://api.github.com/users/jonchang/orgs","repos_url":"https://api.github.com/users/jonchang/repos","events_url":"https://api.github.com/users/jonchang/events{/privacy}","received_events_url":"https://api.github.com/users/jonchang/received_events","type":"User","site_admin":false},"private":false,"html_url":"https://github.com/jonchang/MTurkR","description":"R Client for the MTurk Requester API","fork":true,"url":"https://api.github.com/repos/jonchang/MTurkR","forks_url":"https://api.github.com/repos/jonchang/MTurkR/forks","keys_url":"https://api.github.com/repos/jonchang/MTurkR/keys{/key_id}","collaborators_url":"https://api.github.com/repos/jonchang/MTurkR/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/jonchang/MTurkR/teams","hooks_url":"https://api.github.com/repos/jonchang/MTurkR/hooks","issue_events_url":"https://api.github.com/repos/jonchang/MTurkR/issues/events{/number}","events_url":"https://api.github.com/repos/jonchang/MTurkR/events","assignees_url":"https://api.github.com/repos/jonchang/MTurkR/assignees{/user}","branches_url":"https://api.github.com/repos/jonchang/MTurkR/branches{/branch}","tags_url":"https://api.github.com/repos/jonchang/MTurkR/tags","blobs_url":"https://api.github.com/repos/jonchang/MTurkR/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/jonchang/MTurkR/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/jonchang/MTurkR/git/refs{/sha}","trees_url":"https://api.github.com/repos/jonchang/MTurkR/git/trees{/sha}","statuses_url":"https://api.github.com/repos/jonchang/MTurkR/statuses/{sha}","languages_url":"https://api.github.com/repos/jonchang/MTurkR/languages","stargazers_url":"https://api.github.com/repos/jonchang/MTurkR/stargazers","contributors_url":"https://api.github.com/repos/jonchang/MTurkR/contributors","subscribers_url":"https://api.github.com/repos/jonchang/MTurkR/subscribers","subscription_url":"https://api.github.com/repos/jonchang/MTurkR/subscription","commits_url":"https://api.github.com/repos/jonchang/MTurkR/commits{/sha}","git_commits_url":"https://api.github.com/repos/jonchang/MTurkR/git/commits{/sha}","comments_url":"https://api.github.com/repos/jonchang/MTurkR/comments{/number}","issue_comment_url":"https://api.github.com/repos/jonchang/MTurkR/issues/comments{/number}","contents_url":"https://api.github.com/repos/jonchang/MTurkR/contents/{+path}","compare_url":"https://api.github.com/repos/jonchang/MTurkR/compare/{base}...{head}","merges_url":"https://api.github.com/repos/jonchang/MTurkR/merges","archive_url":"https://api.github.com/repos/jonchang/MTurkR/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/jonchang/MTurkR/downloads","issues_url":"https://api.github.com/repos/jonchang/MTurkR/issues{/number}","pulls_url":"https://api.github.com/repos/jonchang/MTurkR/pulls{/number}","milestones_url":"https://api.github.com/repos/jonchang/MTurkR/milestones{/number}","notifications_url":"https://api.github.com/repos/jonchang/MTurkR/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/jonchang/MTurkR/labels{/name}","releases_url":"https://api.github.com/repos/jonchang/MTurkR/releases{/id}","created_at":"2015-03-13T21:06:07Z","updated_at":"2015-03-13T21:06:08Z","pushed_at":"2015-03-13T21:29:54Z","git_url":"git://github.com/jonchang/MTurkR.git","ssh_url":"git@github.com:jonchang/MTurkR.git","clone_url":"https://github.com/jonchang/MTurkR.git","svn_url":"https://github.com/jonchang/MTurkR","homepage":"http://cran.r-project.org/web/packages/MTurkR/index.html","size":1691,"stargazers_count":0,"watchers_count":0,"language":"R","has_issues":false,"has_downloads":true,"has_wiki":true,"has_pages":true,"forks_count":0,"mirror_url":null,"open_issues_count":0,"forks":0,"open_issues":0,"watchers":0,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/jonchang/MTurkR/pulls/1"},"html":{"href":"https://github.com/jonchang/MTurkR/pull/1"},"issue":{"href":"https://api.github.com/repos/jonchang/MTurkR/issues/1"},"comments":{"href":"https://api.github.com/repos/jonchang/MTurkR/issues/1/comments"},"review_comments":{"href":"https://api.github.com/repos/jonchang/MTurkR/pulls/1/comments"},"review_comment":{"href":"https://api.github.com/repos/jonchang/MTurkR/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/jonchang/MTurkR/pulls/1/commits"},"statuses":{"href":"https://api.github.com/repos/jonchang/MTurkR/statuses/74ea23f7af0c502a39f05dcc62e32d49bfaccfed"}},"merged":false,"mergeable":true,"mergeable_state":"clean","merged_by":null,"comments":0,"review_comments":0,"commits":2,"additions":2,"deletions":4,"changed_files":2}}