{"action":"opened","number":261,"pull_request":{"url":"https://api.github.com/repos/sfirke/janitor/pulls/261","id":241645209,"node_id":"MDExOlB1bGxSZXF1ZXN0MjQxNjQ1MjA5","html_url":"https://github.com/sfirke/janitor/pull/261","diff_url":"https://github.com/sfirke/janitor/pull/261.diff","patch_url":"https://github.com/sfirke/janitor/pull/261.patch","issue_url":"https://api.github.com/repos/sfirke/janitor/issues/261","number":261,"state":"open","locked":false,"title":"Add chisq.test function for two-way tabyl objects","user":{"login":"juba","id":245367,"node_id":"MDQ6VXNlcjI0NTM2Nw==","avatar_url":"https://avatars2.githubusercontent.com/u/245367?v=4","gravatar_id":"","url":"https://api.github.com/users/juba","html_url":"https://github.com/juba","followers_url":"https://api.github.com/users/juba/followers","following_url":"https://api.github.com/users/juba/following{/other_user}","gists_url":"https://api.github.com/users/juba/gists{/gist_id}","starred_url":"https://api.github.com/users/juba/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/juba/subscriptions","organizations_url":"https://api.github.com/users/juba/orgs","repos_url":"https://api.github.com/users/juba/repos","events_url":"https://api.github.com/users/juba/events{/privacy}","received_events_url":"https://api.github.com/users/juba/received_events","type":"User","site_admin":false},"body":"## Description\r\nThis PR aims to apply the chisq.test function to two-way tabyls. It overrides the default stats::chisq.test function, tests if the passed table is a two way tabyl and then calls a new chisq.test.tabyl function. Otherwise it just normally calls stats::chisq.test.\r\n\r\nBy default, chisq.test.tabyl also converts the tables in the returned object (`observed`, `expected`, `residuals`, `stdres`) as tabyls. This can be disabled with the `tabyl_results` argument.\r\n\r\nTests have been included.\r\n\r\n## Related Issue\r\nFixes #255\r\n\r\n## Example\r\ntab <- tabyl(mtcars, gear, cyl)\r\nchisq.test(tab)\r\nchisq.test(tab)$residuals\r\nchisq.test(tab, tabyl_results = FALSE)$residuals\r\n","created_at":"2019-01-01T18:14:59Z","updated_at":"2019-01-01T18:14:59Z","closed_at":null,"merged_at":null,"merge_commit_sha":null,"assignee":null,"assignees":[],"requested_reviewers":[],"requested_teams":[],"labels":[],"milestone":null,"commits_url":"https://api.github.com/repos/sfirke/janitor/pulls/261/commits","review_comments_url":"https://api.github.com/repos/sfirke/janitor/pulls/261/comments","review_comment_url":"https://api.github.com/repos/sfirke/janitor/pulls/comments{/number}","comments_url":"https://api.github.com/repos/sfirke/janitor/issues/261/comments","statuses_url":"https://api.github.com/repos/sfirke/janitor/statuses/2ae9ca5694ed8c04acfeacbcf16d3c13252f1c90","head":{"label":"juba:chisq","ref":"chisq","sha":"2ae9ca5694ed8c04acfeacbcf16d3c13252f1c90","user":{"login":"juba","id":245367,"node_id":"MDQ6VXNlcjI0NTM2Nw==","avatar_url":"https://avatars2.githubusercontent.com/u/245367?v=4","gravatar_id":"","url":"https://api.github.com/users/juba","html_url":"https://github.com/juba","followers_url":"https://api.github.com/users/juba/followers","following_url":"https://api.github.com/users/juba/following{/other_user}","gists_url":"https://api.github.com/users/juba/gists{/gist_id}","starred_url":"https://api.github.com/users/juba/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/juba/subscriptions","organizations_url":"https://api.github.com/users/juba/orgs","repos_url":"https://api.github.com/users/juba/repos","events_url":"https://api.github.com/users/juba/events{/privacy}","received_events_url":"https://api.github.com/users/juba/received_events","type":"User","site_admin":false},"repo":{"id":163736364,"node_id":"MDEwOlJlcG9zaXRvcnkxNjM3MzYzNjQ=","name":"janitor","full_name":"juba/janitor","private":false,"owner":{"login":"juba","id":245367,"node_id":"MDQ6VXNlcjI0NTM2Nw==","avatar_url":"https://avatars2.githubusercontent.com/u/245367?v=4","gravatar_id":"","url":"https://api.github.com/users/juba","html_url":"https://github.com/juba","followers_url":"https://api.github.com/users/juba/followers","following_url":"https://api.github.com/users/juba/following{/other_user}","gists_url":"https://api.github.com/users/juba/gists{/gist_id}","starred_url":"https://api.github.com/users/juba/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/juba/subscriptions","organizations_url":"https://api.github.com/users/juba/orgs","repos_url":"https://api.github.com/users/juba/repos","events_url":"https://api.github.com/users/juba/events{/privacy}","received_events_url":"https://api.github.com/users/juba/received_events","type":"User","site_admin":false},"html_url":"https://github.com/juba/janitor","description":"simple tools for data cleaning in R","fork":true,"url":"https://api.github.com/repos/juba/janitor","forks_url":"https://api.github.com/repos/juba/janitor/forks","keys_url":"https://api.github.com/repos/juba/janitor/keys{/key_id}","collaborators_url":"https://api.github.com/repos/juba/janitor/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/juba/janitor/teams","hooks_url":"https://api.github.com/repos/juba/janitor/hooks","issue_events_url":"https://api.github.com/repos/juba/janitor/issues/events{/number}","events_url":"https://api.github.com/repos/juba/janitor/events","assignees_url":"https://api.github.com/repos/juba/janitor/assignees{/user}","branches_url":"https://api.github.com/repos/juba/janitor/branches{/branch}","tags_url":"https://api.github.com/repos/juba/janitor/tags","blobs_url":"https://api.github.com/repos/juba/janitor/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/juba/janitor/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/juba/janitor/git/refs{/sha}","trees_url":"https://api.github.com/repos/juba/janitor/git/trees{/sha}","statuses_url":"https://api.github.com/repos/juba/janitor/statuses/{sha}","languages_url":"https://api.github.com/repos/juba/janitor/languages","stargazers_url":"https://api.github.com/repos/juba/janitor/stargazers","contributors_url":"https://api.github.com/repos/juba/janitor/contributors","subscribers_url":"https://api.github.com/repos/juba/janitor/subscribers","subscription_url":"https://api.github.com/repos/juba/janitor/subscription","commits_url":"https://api.github.com/repos/juba/janitor/commits{/sha}","git_commits_url":"https://api.github.com/repos/juba/janitor/git/commits{/sha}","comments_url":"https://api.github.com/repos/juba/janitor/comments{/number}","issue_comment_url":"https://api.github.com/repos/juba/janitor/issues/comments{/number}","contents_url":"https://api.github.com/repos/juba/janitor/contents/{+path}","compare_url":"https://api.github.com/repos/juba/janitor/compare/{base}...{head}","merges_url":"https://api.github.com/repos/juba/janitor/merges","archive_url":"https://api.github.com/repos/juba/janitor/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/juba/janitor/downloads","issues_url":"https://api.github.com/repos/juba/janitor/issues{/number}","pulls_url":"https://api.github.com/repos/juba/janitor/pulls{/number}","milestones_url":"https://api.github.com/repos/juba/janitor/milestones{/number}","notifications_url":"https://api.github.com/repos/juba/janitor/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/juba/janitor/labels{/name}","releases_url":"https://api.github.com/repos/juba/janitor/releases{/id}","deployments_url":"https://api.github.com/repos/juba/janitor/deployments","created_at":"2019-01-01T12:51:13Z","updated_at":"2019-01-01T12:51:15Z","pushed_at":"2019-01-01T18:08:16Z","git_url":"git://github.com/juba/janitor.git","ssh_url":"git@github.com:juba/janitor.git","clone_url":"https://github.com/juba/janitor.git","svn_url":"https://github.com/juba/janitor","homepage":"","size":1264,"stargazers_count":0,"watchers_count":0,"language":"R","has_issues":false,"has_projects":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":0,"mirror_url":null,"archived":false,"open_issues_count":0,"license":{"key":"other","name":"Other","spdx_id":"NOASSERTION","url":null,"node_id":"MDc6TGljZW5zZTA="},"forks":0,"open_issues":0,"watchers":0,"default_branch":"master"}},"base":{"label":"sfirke:master","ref":"master","sha":"4bf8ddfc9b1bb1bd43e794431db021bf0010cba0","user":{"login":"sfirke","id":7569808,"node_id":"MDQ6VXNlcjc1Njk4MDg=","avatar_url":"https://avatars3.githubusercontent.com/u/7569808?v=4","gravatar_id":"","url":"https://api.github.com/users/sfirke","html_url":"https://github.com/sfirke","followers_url":"https://api.github.com/users/sfirke/followers","following_url":"https://api.github.com/users/sfirke/following{/other_user}","gists_url":"https://api.github.com/users/sfirke/gists{/gist_id}","starred_url":"https://api.github.com/users/sfirke/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/sfirke/subscriptions","organizations_url":"https://api.github.com/users/sfirke/orgs","repos_url":"https://api.github.com/users/sfirke/repos","events_url":"https://api.github.com/users/sfirke/events{/privacy}","received_events_url":"https://api.github.com/users/sfirke/received_events","type":"User","site_admin":false},"repo":{"id":56102322,"node_id":"MDEwOlJlcG9zaXRvcnk1NjEwMjMyMg==","name":"janitor","full_name":"sfirke/janitor","private":false,"owner":{"login":"sfirke","id":7569808,"node_id":"MDQ6VXNlcjc1Njk4MDg=","avatar_url":"https://avatars3.githubusercontent.com/u/7569808?v=4","gravatar_id":"","url":"https://api.github.com/users/sfirke","html_url":"https://github.com/sfirke","followers_url":"https://api.github.com/users/sfirke/followers","following_url":"https://api.github.com/users/sfirke/following{/other_user}","gists_url":"https://api.github.com/users/sfirke/gists{/gist_id}","starred_url":"https://api.github.com/users/sfirke/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/sfirke/subscriptions","organizations_url":"https://api.github.com/users/sfirke/orgs","repos_url":"https://api.github.com/users/sfirke/repos","events_url":"https://api.github.com/users/sfirke/events{/privacy}","received_events_url":"https://api.github.com/users/sfirke/received_events","type":"User","site_admin":false},"html_url":"https://github.com/sfirke/janitor","description":"simple tools for data cleaning in R","fork":false,"url":"https://api.github.com/repos/sfirke/janitor","forks_url":"https://api.github.com/repos/sfirke/janitor/forks","keys_url":"https://api.github.com/repos/sfirke/janitor/keys{/key_id}","collaborators_url":"https://api.github.com/repos/sfirke/janitor/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/sfirke/janitor/teams","hooks_url":"https://api.github.com/repos/sfirke/janitor/hooks","issue_events_url":"https://api.github.com/repos/sfirke/janitor/issues/events{/number}","events_url":"https://api.github.com/repos/sfirke/janitor/events","assignees_url":"https://api.github.com/repos/sfirke/janitor/assignees{/user}","branches_url":"https://api.github.com/repos/sfirke/janitor/branches{/branch}","tags_url":"https://api.github.com/repos/sfirke/janitor/tags","blobs_url":"https://api.github.com/repos/sfirke/janitor/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/sfirke/janitor/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/sfirke/janitor/git/refs{/sha}","trees_url":"https://api.github.com/repos/sfirke/janitor/git/trees{/sha}","statuses_url":"https://api.github.com/repos/sfirke/janitor/statuses/{sha}","languages_url":"https://api.github.com/repos/sfirke/janitor/languages","stargazers_url":"https://api.github.com/repos/sfirke/janitor/stargazers","contributors_url":"https://api.github.com/repos/sfirke/janitor/contributors","subscribers_url":"https://api.github.com/repos/sfirke/janitor/subscribers","subscription_url":"https://api.github.com/repos/sfirke/janitor/subscription","commits_url":"https://api.github.com/repos/sfirke/janitor/commits{/sha}","git_commits_url":"https://api.github.com/repos/sfirke/janitor/git/commits{/sha}","comments_url":"https://api.github.com/repos/sfirke/janitor/comments{/number}","issue_comment_url":"https://api.github.com/repos/sfirke/janitor/issues/comments{/number}","contents_url":"https://api.github.com/repos/sfirke/janitor/contents/{+path}","compare_url":"https://api.github.com/repos/sfirke/janitor/compare/{base}...{head}","merges_url":"https://api.github.com/repos/sfirke/janitor/merges","archive_url":"https://api.github.com/repos/sfirke/janitor/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/sfirke/janitor/downloads","issues_url":"https://api.github.com/repos/sfirke/janitor/issues{/number}","pulls_url":"https://api.github.com/repos/sfirke/janitor/pulls{/number}","milestones_url":"https://api.github.com/repos/sfirke/janitor/milestones{/number}","notifications_url":"https://api.github.com/repos/sfirke/janitor/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/sfirke/janitor/labels{/name}","releases_url":"https://api.github.com/repos/sfirke/janitor/releases{/id}","deployments_url":"https://api.github.com/repos/sfirke/janitor/deployments","created_at":"2016-04-12T22:29:40Z","updated_at":"2019-01-01T14:53:26Z","pushed_at":"2018-12-01T22:31:28Z","git_url":"git://github.com/sfirke/janitor.git","ssh_url":"git@github.com:sfirke/janitor.git","clone_url":"https://github.com/sfirke/janitor.git","svn_url":"https://github.com/sfirke/janitor","homepage":"","size":1267,"stargazers_count":553,"watchers_count":553,"language":"R","has_issues":true,"has_projects":true,"has_downloads":true,"has_wiki":true,"has_pages":true,"forks_count":62,"mirror_url":null,"archived":false,"open_issues_count":51,"license":{"key":"other","name":"Other","spdx_id":"NOASSERTION","url":null,"node_id":"MDc6TGljZW5zZTA="},"forks":62,"open_issues":51,"watchers":553,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/sfirke/janitor/pulls/261"},"html":{"href":"https://github.com/sfirke/janitor/pull/261"},"issue":{"href":"https://api.github.com/repos/sfirke/janitor/issues/261"},"comments":{"href":"https://api.github.com/repos/sfirke/janitor/issues/261/comments"},"review_comments":{"href":"https://api.github.com/repos/sfirke/janitor/pulls/261/comments"},"review_comment":{"href":"https://api.github.com/repos/sfirke/janitor/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/sfirke/janitor/pulls/261/commits"},"statuses":{"href":"https://api.github.com/repos/sfirke/janitor/statuses/2ae9ca5694ed8c04acfeacbcf16d3c13252f1c90"}},"author_association":"NONE","merged":false,"mergeable":null,"rebaseable":null,"mergeable_state":"unknown","merged_by":null,"comments":0,"review_comments":0,"maintainer_can_modify":true,"commits":1,"additions":178,"deletions":0,"changed_files":4}}
{"actor":{"display_login":"juba"}}