{"action":"closed","issue":{"url":"https://api.github.com/repos/sfirke/janitor/issues/41","repository_url":"https://api.github.com/repos/sfirke/janitor","labels_url":"https://api.github.com/repos/sfirke/janitor/issues/41/labels{/name}","comments_url":"https://api.github.com/repos/sfirke/janitor/issues/41/comments","events_url":"https://api.github.com/repos/sfirke/janitor/issues/41/events","html_url":"https://github.com/sfirke/janitor/issues/41","id":165630711,"number":41,"title":"crosstab.data.frame produces factor result, while crosstab.default produces character","user":{"login":"sfirke","id":7569808,"avatar_url":"https://avatars.githubusercontent.com/u/7569808?v=3","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},"labels":[],"state":"closed","locked":false,"assignee":null,"assignees":[],"milestone":null,"comments":0,"created_at":"2016-07-14T18:45:08Z","updated_at":"2016-07-14T18:46:18Z","closed_at":"2016-07-14T18:46:18Z","body":"Compare:\r\n```\r\nz_df <- crosstab(dat, v3, v1)\r\nz <- crosstab(dat$v3, dat$v1)\r\n```\r\n\r\nCausing this test to fail: \r\n```\r\ntest_that(\"crosstab.data.frame dispatches\", {\r\n  expect_equal(z_df,\r\n               z %>% setNames(., c(\"v3\", names(.)[-1]))) # compare to regular z above - they have different names[1] due to piping\r\n})\r\n```\r\n\r\nLooks like it's due to needing `stringsAsFactors = FALSE` in `crosstab.data.frame`."}}
{"actor":{"display_login":"sfirke"}}